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

Posted on 2005-03-01
Medium Priority
Last Modified: 2008-02-26
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.
Question by:trwd
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
LVL 13

Expert Comment

ID: 13433413
check here for dBase connections


oConn.Open "Driver={Microsoft dBASE Driver (*.dbf)};" & _
           "DriverID=277;" & _

oRs.Open "Select * From user.dbf", oConn, , ,adCmdText
LVL 11

Accepted Solution

JohnModig earned 2000 total points
ID: 13433482
"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\mydbpath;"

Or try this:
A site full of connectionstrings for diferent databases using different methods!

Author Comment

ID: 13433533
I have set up a DSN to the database, does the query string change?

Author Comment

ID: 13433747
I meant that I have set up a dsn so how does that alter the connection string
LVL 46

Expert Comment

ID: 13433974
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.


Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

765 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