Link to home
Start Free TrialLog in
Avatar of Yuanyu
Yuanyu

asked on

Open DBF file

How can I open DBF file in Window2000 & VB6 ?
ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

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
and i haven't had much experience with w2k but it should still work.
Avatar of Yuanyu
Yuanyu

ASKER

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!
Avatar of Yuanyu

ASKER

I can use jet3.51 to open DBF with DAO in Win95/98, but failed in Win2000.
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
Avatar of Yuanyu

ASKER

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.
An integer ID for the driver.
21 (dBASE III)
277 (dBASE IV)
533 (dBASE 5.0)

good luck
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.
Avatar of DanRollins
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