Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBScript and database

Posted on 1999-07-30
4
Medium Priority
?
235 Views
Last Modified: 2013-12-25
 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?
0
Comment
Question by:critter017
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 800 total points
ID: 1864577
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
 
LVL 1

Author Comment

by:critter017
ID: 1864578
I will try your suggestion.  If it works I will double the points and award them to you.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1864579
Thanks... If you need any more help, please email me at masseym@mrqcorp.com
0
 
LVL 1

Author Comment

by:critter017
ID: 1864580
Adjusted points to 200
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question