PDA

Click to See Complete Forum and Search --> : Remote Database access over internet


shaunmccallig
Apr 26th, 2001, 03:24 AM
Help! Trying to query a DB across the web!

(I've tried this question in the database section already but no replies at all...)

The same code works fine when querying a local (internal) web server. The only change in the remote version is changing the "Remote Server" setting to the other server.

However, when I try this code to query a remote web server (which has all the correct domains and datasources and userids - I've tried using the admin userid and password as well!) I always get the same response:

"Run Time Error '8447'. Internet Server Error"

...Here's the code...

StrQuery = "Provider=MS Remote;" _
& "Remote Provider=MSDataShape;" _
& "Remote Server=http://www.mydomain.com;" _
& "Data Source=My_Datasource;"
& "User Id=MyUserID;Password=MyPassword;"

Set rsTracking = New ADODB.Recordset
StrQuery = "SELECT * FROM MY_TABLE...etc."

Query
With rsTracking
.CursorLocation = adUseClient
.Open StrQuery, cnnTracking, adOpenStatic, adLockReadOnly
End With

...Any ideas out there?

plenderj
Apr 26th, 2001, 05:34 AM
You could always do it through ASP.
Thats what I'd do ....

shaunmccallig
Apr 26th, 2001, 05:45 AM
...my query needs to populate a VB application that creates a TreeView object based on the results...

plenderj
Apr 26th, 2001, 06:04 AM
You could do it over a winsock connection.
One vb app connects to the other vb app via winsock and asks the second vb app to do the database stuff for it.