花了一天的時間開始學習ASP,看了一下視頻,還好有JSP的基礎,不然看著一定會頭昏,基礎部分我直接跳過,因為很多程序語言的語法知識都是一樣的,所以我沒有詳細看語法知識,現(xiàn)在有百度,google,記不住,谷歌一下,直接從操作數(shù)據(jù)庫開始的,其他和JSP操作數(shù)據(jù)庫一樣,但是有些語法知識不一樣擺了,
實例一:
數(shù)據(jù)庫連接代碼:
<%
dim db //定義了一個變量 db
db="db.mdb"
dim ConnStr,Conn //定義了兩個變量 ConnStr,Conn
ConnStr ="driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath(db) //數(shù)據(jù)庫連接語句
Set conn = Server.CreateObject("ADODB.Connection") //創(chuàng)建Connection對象
conn.Open connstr
%>
實例一:
數(shù)據(jù)庫連接代碼:
<%
dim db //定義了一個變量 db
db="db.mdb"
dim ConnStr,Conn //定義了兩個變量 ConnStr,Conn
ConnStr ="driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath(db) //數(shù)據(jù)庫連接語句
Set conn = Server.CreateObject("ADODB.Connection") //創(chuàng)建Connection對象
conn.Open connstr
%>
posted @ 2008-09-02 09:31 林世軍 閱讀(142) | 評論 (0) | 編輯 收藏