Jump to content

dsn less connection with access database

Recommended Posts

Hi,I inserted in my site an ASP page where I try to connect with an Access database without a DSN. Bellow the code I used in my page:" objconn = Server.createObject("ADODB.connection"); strcon = "Provider=Microsoft.Jet.OLEDB.4.0; DataSource=" & Server.MapPath("mdb-database/riviera.mdb"); objconn.Open(strcon);"but when it run this is the result:"Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /MaintManage.asp, line 150 "Is it possible the provider doesn't support this connection type? Or is the code wrong? Thneks for help?bye

Link to post
Share on other sites

set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/your/database/path.mdb"))or set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "D:\your database path "

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...