469,948 Members | 2,850 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,948 developers. It's quick & easy.

Remote Ms Access Database Connection (web)

Hi,



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.



thanks.
May 18 '07 #1
1 2673
Hi,

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....

-Tanya
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
By using this site, you agree to our Privacy Policy and Terms of Use.