Link to home
Start Free TrialLog in
Avatar of trwd
trwdFlag for United States of America

asked on

Query String to connect to a DBase(.dbf) database via an ODBC connection

Can any of y'all help me out with the query string to a dbf table via  odbc. I am implementing this on an ASP page using ADO. Any help will be appreciated.
Avatar of nurbek
nurbek

check here for dBase connections

http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForDBASE


oConn.Open "Driver={Microsoft dBASE Driver (*.dbf)};" & _
           "DriverID=277;" & _
           "Dbq=c:\somepath"

oRs.Open "Select * From user.dbf", oConn, , ,adCmdText
ASKER CERTIFIED SOLUTION
Avatar of JohnModig
JohnModig

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of trwd

ASKER

I have set up a DSN to the database, does the query string change?
Avatar of trwd

ASKER

I meant that I have set up a dsn so how does that alter the connection string
If I understand your question, it should look like this:

set objConnection=Server.CreateObject("ADODB.Connection")
objConnection.ConnectionTimeout = 15
objConnection.CommandTimeout =  10
objConnection.Mode = 3 'adModeReadWrite
objConnection.Open strYourDSN


where strYourDSN is the name of the ODBC DSN that you created.

FtB