VBScript and database

 Is it possible to use VBScript to query an access 97 file directly?  If I have the Access file in my Web directory, can I use VBScript to query information from it?  Or do I need an ODBC connection provided by my ISP provider?
LVL 1
critter017Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MasseyMCommented:
You can create a DSN-less connection...

Do this (3 files):
dsn.asp
----------
<%
      sDB = "database.mdb"
      sScriptDir = "./"
      sPath = Server.MapPath(sScriptDir) + "\"
      sDSN = "filedsn=" & sPath & "database.dsn;DefaultDir=" & sPath & ";DBQ=" & sPath & sDB & ";"
%>

database.dsn
--------------
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=512
ImplicitCommitSync=Yes
FIL=MS Access
DriverId=25


yourfile.asp
--------------
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.OPen sDSN, "", ""
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open "SELECT * FROM Database_Table", Conn, 3, 3

etc...


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
critter017Author Commented:
I will try your suggestion.  If it works I will double the points and award them to you.
0
MasseyMCommented:
Thanks... If you need any more help, please email me at masseym@mrqcorp.com
0
critter017Author Commented:
Adjusted points to 200
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.