-
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?
-
Take a look at this thread http://forums.vb-world.net/showthrea...threadid=21195
Mark Sreeves explains it.
-
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?
-
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.
-
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"
-
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...