下面是引用setiufo于2006-10-2 22:27发表的 :
红色的地方是需要修改的吗?
<%
Dim Rectest
Dim Rectest_numRows
strConn1 = "DRIVER={Microsoft Access Driver(*.mdb)};DBQ=" & Server.Mappath(YourDB.mdb)
.......
<%
Dim Rectest
Dim Rectest_numRows
strConn1 = "DRIVER={Microsoft Access Driver(*.mdb)};DBQ=" & Server.Mappath(
YourDB.mdb)
Set
objDBcon1 = Server.CreateObject("ADODB.Connection")
objDBcon1.Open strConn1
Set Rectest = Server.CreateObject("ADODB.Recordset")
Rectest.ActiveConnection = objDBcon1
Rectest.Source = "SELECT * FROM t1"
Rectest.CursorType = 0
Rectest.CursorLocation = 2
Rectest.LockType = 1
Rectest.Open()
Rectest_numRows = 0
%>