• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 870
  • Last Modified:

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.
0
trwd
Asked:
trwd
1 Solution
 
nurbekCommented:
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
0
 
JohnModigCommented:
"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\mydbpath;"

Or try this:
http://www.connectionstrings.com/
A site full of connectionstrings for diferent databases using different methods!
0
 
trwdAuthor Commented:
I have set up a DSN to the database, does the query string change?
0
 
trwdAuthor Commented:
I meant that I have set up a dsn so how does that alter the connection string
0
 
fritz_the_blankCommented:
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
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now