其中adofunctions.asp为
<!-- #include file ="adovbs.inc" -->
<%
dim objconn
function getrecordset(filename,tablename)
set objconn =server.createobject("adodb.connection")
objconn.connectionstring="provider=microsoft.jet.oledb.4.0;" & "data source=" & server.mappath(filename)
objconn.open
set getrecordset=server.createobject("adodb.recordset")
getrecordset.open tablename,objconn,adopenkeyset,adlockoptimistic,adcmdtable
end function
<!-- #include file ="adovbs.inc" -->
<%
dim objconn
function getrecordset(filename,tablename)
set objconn =server.createobject("adodb.connection")
objconn.connectionstring="provider=microsoft.jet.oledb.4.0;" & "data source=" & server.mappath(filename)
objconn.open
set getrecordset=server.createobject("adodb.recordset")
getrecordset.open tablename,objconn,adopenkeyset,adlockoptimistic,adcmdtable
end function
function getsqlrecordset(strsql,filename,tablename)
set objconn=server.createobject("adodb.connection")
objconn.connectionstring="provider=microsoft.jet.oledb.4.0;" & "data source=" & server.mappath(filename)
objconn.open
set getsqlrecordset=server.createobject("adodb.recordset")
getsqlrecordset.open strsql,objconn,adopenkeyset,adlockoptimistic,adcmdtext
end function
%>