Jump to content

connect ms-access with asp


Matar

Recommended Posts

i have a problem when i connecting asp with ms-access and the problem in the include file code<!--include file = "adovbs.inc"-->in the explorer page apper ( this file not found)................... am writinf the following code ..................<--!include file = "adovbs.inc"--><html dir = "rtl"><body><%dim cnset cn = server.createobject("ADODB.connection")cn.connectionstring = "provider = microsoft.jet.OLEDB.4.0;data source = "& servermappath("matar.mdb")cn.opendim rs set rs = server.createobject("ADODB.recordset")rs.open "select * from matar",cn,adopenstatic,aslockoptimisticwhile NOT rs.EOFresponse.write rs("firstname")&"<br/">rs.movenextwend%></body></html>......................................commentsMy OS : XP P2My ms-Office is : office XPThe Name Of The database is : samer.mdb (stored in C drive)i cant resolve this problem please help me :)

Link to comment
Share on other sites

try it like this:

set conn = server.createobject("adodb.connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.mappath("...path/database.mdb"))set rs = server.createobject("ADODB.recordset")
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...