|
-
Jul 10th, 2000, 03:23 PM
#1
Thread Starter
New Member
I usually use an Access database with VB like this:
Dim ws_WS As Workspace
Dim db_DB As Database
Dim rs_RS As Recordset
Set ws_WS=Workspaces(0)
Set db_DB=ws_WS.OpenDatabase("c:\data.mdb")
Set rs_RS=db_DB.OpenRecordset("Table",dbOpenDynaset)
Something like that...
The question is: Is it possible to open a database resident on a Web server (or web host) in the same manner as I would a local database? That is, without any kind of service running on the host? Something like:
Set db_DB=ws_WS.OpenDatabase("http://whatever.com/data.mdb")
This kind of setup would not need any kind of service running on the host, just like in a local hard disk. Is it possible, and if so, how?
-
Jul 10th, 2000, 04:12 PM
#2
Member
Take a look at this thread http://forums.vb-world.net/showthrea...threadid=21195
Mark Sreeves explains it.
-
Jul 10th, 2000, 04:29 PM
#3
Thread Starter
New Member
Ok, but since the database is in, say: http://whatever.com, I cannot specify that path in the ODBC driver in control panel... what do I do?
-
Jul 10th, 2000, 04:33 PM
#4
Member
Hmmm.... I don't know, I'm fairly new to ASP. I assume you tried putting the URL in for the path andit didn't work, so I'm stumped.
-
Jul 10th, 2000, 08:53 PM
#5
Lively Member
it would be tricky to call it the way you want. Typically you can use an Access Db but you should use ADO and not DAO.
## Open DataBase Connection
set my_conn= Server.CreateObject("ADODB.Connection")
my_Conn.Open ConnString
'## Get Totals
set rs1 = Server.CreateObject("ADODB.Recordset")
strSQL = "Select * from Totals"
rs1.open strSQL, my_conn
rs1.Close
set rs1 = nothing
Within connectionstring you could call a dsn such as
connstring="WhateverDSNYouwant"
-
Jul 11th, 2000, 10:27 AM
#6
Thread Starter
New Member
Ok, but there is still one question:
How do I specify the web path in the ODBC Control Panel icon? It only accepts regular drive or network paths, not "http://" paths...
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
|