|
-
Mar 11th, 2006, 09:51 AM
#1
Thread Starter
Addicted Member
MS-Access Remote connection
Hello,
This is the code I am using to connect to a access database remotely.
(Actually I am connecting to database on the same machine. I couldn't get hold of a person with a dbms and net connection on his machine , to try remote connection)
VB Code:
Private Sub Command1_Click()
Set conn = New ADODB.Connection
'Set rs = New ADODB.Recordset
On Error GoTo dberror
With conn
.ConnectionString = " PROVIDER = MS Remote ; " _
& "Remote Server = http://x.x.x.x;" _
& "Remote Provider = Microsoft.Jet.OLEDB.4.0 ;" _
& "Data Source = d:\nse\nsedata.mdb" _
& "User Id=Admin;Password=;"
.Open
End With
'rs.Open "todaydeal", conn, adOpenKeyset, adLockOptimistic, adCmdTable
MsgBox ("successfully opened the connection")
Exit Sub
dberror:
MsgBox ("error connecting to database")
Print Err.Source
Print Err.Number
Print Err.Description
End Sub
This part works fine.
When I uncomment the statements involving recordsets, then I am getting the error:
microsoft ado/rds
8447
internet server error
I didn't post the actual ip address. May be I am getting paranoid , but I was not sure if it was the right thing to do.
What is it that I should do?
Thank you.
-
Mar 12th, 2006, 08:54 AM
#2
Thread Starter
Addicted Member
Re: MS-Access Remote connection
I am using MS-Access 2000 and windows xp professional.
Please help
Thank you.
-
Mar 12th, 2006, 11:50 PM
#3
Re: MS-Access Remote connection
 Originally Posted by srisa
When I uncomment the statements involving recordsets, then I am getting the error
What recordset are you talking about? Would you care to post the code you have that you have problem with?
-
Mar 14th, 2006, 07:43 AM
#4
Thread Starter
Addicted Member
Re: MS-Access Remote connection
If you have observed the code that I have posted two lines have been commented out :
VB Code:
set rs= new adodb.recordset
rs.open "todaydeal",conn,adopenkeyset,adlockoptimistic,adcmdtable
If I uncomment these lines it is giving error, otherwise no.
-
Mar 14th, 2006, 11:09 PM
#5
Re: MS-Access Remote connection
Have a look at the example of RhinoBull, it may be of help...
-
Mar 15th, 2006, 06:02 AM
#6
Thread Starter
Addicted Member
Re: MS-Access Remote connection
Thank you for sparing your time.
There is not much difference in the my code and the code posted by Rhino Bull. May be it has something to do with configuring the IIS. If I enable anonymous access , error is "Internet server error" . If I disable anonymous access, at the time of connecting a dialog box is displayed asking my user name and password. I tried all the accounts but access is denied and the error is "Access denied". ( I have installed IIS on my windows XP machine and I am using the user name and password that I use to log in to my machine). I have tried using the administrator account for anonymous access. In that case error is
microsoft ado/rds
-2147012866
Interne Client Error (0x80072efe)
Now what do I do?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|