trwd
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have set up a DSN to the database, does the query string change?
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.Creat eObject("A DODB.Conne ction")
objConnection.ConnectionTi meout = 15
objConnection.CommandTimeo ut = 10
objConnection.Mode = 3 'adModeReadWrite
objConnection.Open strYourDSN
where strYourDSN is the name of the ODBC DSN that you created.
FtB
set objConnection=Server.Creat
objConnection.ConnectionTi
objConnection.CommandTimeo
objConnection.Mode = 3 'adModeReadWrite
objConnection.Open strYourDSN
where strYourDSN is the name of the ODBC DSN that you created.
FtB
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