About the ASP tutorial database tutorial connectors Such open questions, is generally just learning the ASP program soon friends, is also said that the introduction of ASP's friends to learn, in the ASP and Access database to connect the words need to use the provider= Microsoft.Jet.OLEDB.4.0 to do, look at the example below.
<% @language = "VBScript" codepage= "936"%>
<%
Dim db
Const Databasetype= "Access" & nbsp;
db= "bbs/www.111cn.net/cnhww.asp" //Setting the Connection database path
On Error Resume Next
dim CONNSTR
dim conn
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Server.MapPath (db)
set conn = Server.CreateObject ("adodb.connection")
conn.open connstr// Open the database connection
if err then
err.clear
set conn = Nothing
Response.Write Database connection error, please check the database parameter settings in the Conn.asp file. "
response.end
end if
Sub Closeconn ()//Close database connection
on Error Resume Next
if IsObject (conn) then
conn.close
set conn=nothing
end if
End Sub
%>< /p>