Open DBF file

How can I open DBF file in Window2000 & VB6 ?
YuanyuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bobbit31Commented:
one option:

ODBC Driver for dBASE

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

Note: Specify the filename in the SQL statement. For example:
         oRs.Open "Select * From user.dbf", oConn, , ,adCmdText

Note: MDAC 2.1 (or greater) requires the Borland Database Engine (BDE) to update dBase DBF files.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bobbit31Commented:
and i haven't had much experience with w2k but it should still work.
0
YuanyuAuthor Commented:
1. what does "DriverID=277;" mean?
2. How can I update DBF file with the Borland Database Engine? Is BDE free? Any other free tools can I use?
Thanks!
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

YuanyuAuthor Commented:
I can use jet3.51 to open DBF with DAO in Win95/98, but failed in Win2000.
0
tlw2651Commented:
This worked for me...

Dim rstWhatever As Recordset
Dim dbName As String
Dim ConnString As String
   
    dbName = App.Path & "\whatever.MDB"
    ConnString = "Provider=Microsoft.JET.OLEDB.4.0;Data
        Source=" & dbName
    Set m_conn = New Connection
    m_conn.Open ConnString

    Set rstWhatever = New Recordset
    rstWhatever.Open "SELECT * FROM Whatever", m_conn,
        adOpenStatic, adLockOptimistic
0
YuanyuAuthor Commented:
sorry, tlw2651, your answer does not refer to my question. I need to open DBF file and not MDB file with VB6 in win2000. Data source setting is not my expectant answer.
Thanks.
0
bobbit31Commented:
An integer ID for the driver.
21 (dBASE III)
277 (dBASE IV)
533 (dBASE 5.0)

good luck
0
TimCotteeHead of Software ServicesCommented:
Hi Yuanyu,
As you are using win2k, you are also using MDAC 2.5, support for dBase files using the dBase drivers was partially withdrawn in MDAC 2.5 unless you are using the BDE as well. You can use the Microsoft Visual Foxpro driver to update/insert records to a dBase file. However using this driver you do not have the ability to use the dBase index files. This may or may not be a problem for you.
0
DanRollinsCommented:
Hi Yuanyu,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days.  I will suggest to:

    Split points between: bobbit31 and TimCottee

Yuanyu, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will followup.

EXPERTS: Please post closing recommendations.
==========
DanRollins -- EE database cleanup volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.