472,110 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

Remote Ms Access Database Connection (web)


I am going through some serious issues while connecting to ms access database on web.

My database is on a shared hosted site. I am trying to access the db.mdb file.

I can connect to the file correctly using the following syntax in asp 3.0.

set conn = CreateObject("ADODB.Connection")
conn.open "Provider=MS Remote;" &_
"Remote Server=http://<Web SERVER IP>;" &_
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=<Database Path>;"

But as soon as I try to create the recordset and execute the sql query...it throws an error.

set rs=server.CreateObject("ADODB.recordset")
rs.open "Select * from userold", conn,1,2

Error: Unexpected Error.

I dont know if its because of the iis permission or something...I cannot set any permissions on server since its on shared hosting.

is there any workaround for this ? I can work on C#, VB and asp.net/asp3.0. solutions in these language will be greatly appriciated.

I am in urgent need for the solution.

May 18 '07 #1
1 2739

check with this code. Connection to access DB through DSN is pretty simple...

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=name of the mdb file"
Set objRS = Server.CreateObject("ADODB.Recordset")

Query what you want as conn is opened&

Make sure, that you configure your system DSN with the mdb file that you have on the dev server/testing server that you use....

May 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Hrvoje Vrbanc | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.