DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: dbf file formats in VB

  1. #1
    JJ Guest

    dbf file formats in VB


    I'm familiar w/ processing ACCESS mdb using ADO. But, what are the specifics
    (i.e. PROVIDER='string' requirements) for processing dBase dbf? After opening
    dbf, shouldn't recordset processing techniques be the same as processing
    ACCESS mdb recordset?

  2. #2
    Paul Clement Guest

    Re: dbf file formats in VB

    On 21 Jun 2000 11:01:15 -0700, "JJ" <jyazzie@washoe.k12.nv.us> wrote:


    I'm familiar w/ processing ACCESS mdb using ADO. But, what are the specifics
    (i.e. PROVIDER='string' requirements) for processing dBase dbf? After opening
    dbf, shouldn't recordset processing techniques be the same as processing
    ACCESS mdb recordset?

    I've included a code example below. Remember that essentially you're opening a folder and not a
    database file. The actual database file (Customer.dbf in the below example) is equivalent to a table
    object:

    Sub ADOOpenISAMDatabase()

    Dim cnn As New ADODB.Connection
    Dim rs As New ADODB.Recordset

    cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\Microsoft
    Office\Office;Extended Properties=dBase III;"

    rs.Open "Select * from Customer", cnn, adOpenForwardOnly, adLockReadOnly

    rs.Close

    cnn.Close

    End Sub

    In addition, if you use the 4.0 Jet provider (as in the example above) you need the Borland Database
    Engine (BDE) for write access. If you use the 3.51 Jet provider you don't need BDE for write access.


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  3. #3
    jj Guest

    Re: dbf file formats in VB


    ????? If using 4.0 Jet provider, how is the Borland Database Engine (BDE)
    specified?
    I need write access to dBase IV, so, should I use the 3.51 Jet provider
    instead?
    ?????


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:

    >Sub ADOOpenISAMDatabase()
    >
    > Dim cnn As New ADODB.Connection
    > Dim rs As New ADODB.Recordset
    >
    > cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\Microsoft
    >Office\Office;Extended Properties=dBase III;"
    >
    > rs.Open "Select * from Customer", cnn, adOpenForwardOnly, adLockReadOnly
    >
    > rs.Close
    >
    > cnn.Close
    >
    >End Sub
    >In addition, if you use the 4.0 Jet provider (as in the example above) you

    need the
    >Borland Database
    >Engine (BDE) for write access. If you use the 3.51 Jet provider you don't

    need BDE for
    >write access.
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



  4. #4
    Paul Clement Guest

    Re: dbf file formats in VB

    On 21 Jun 2000 14:06:49 -0700, "jj" <jyazzie@washoe.k12.nv.us> wrote:


    ????? If using 4.0 Jet provider, how is the Borland Database Engine (BDE)
    specified?
    I need write access to dBase IV, so, should I use the 3.51 Jet provider
    instead?
    ?????

    See the following:

    http://support.microsoft.com/support.../Q248/8/41.ASP
    http://support.microsoft.com/support.../Q230/1/25.ASP
    http://support.microsoft.com/support.../Q247/4/40.ASP

    In future versions of Windows, it becomes a bit more difficult to use previous versions of the Jet
    provider, primarily because the most recent version is installed and applications will use it by
    default (see the last article).

    It's messy as it stands and normally I would recommend using the Jet 3.51 provider to avoid BDE, but
    the upgrade path (with respect to the OS and MDAC) points toward the use of the BDE.


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  5. #5
    jj Guest

    Re: dbf file formats in VB


    To revisit or belabor the issue again...
    To process (write) DBF files using OLEDB 3.51, does that preclude one to
    use DAO, or is ADO still an option?

  6. #6
    JJ Guest

    Re: dbf file formats in VB


    Also, when attempting to use Jet 3.51 within a connection string, I get the
    following error:
    "Couldn't find installable ISAM". If using Jet 4.0, I don't get the error
    and I can process dbf file.
    Any clues...?

  7. #7
    Paul Clement Guest

    Re: dbf file formats in VB

    On 23 Jun 2000 13:20:50 -0700, "JJ" <jyazzie@washoe.k12.nv.us> wrote:


    Also, when attempting to use Jet 3.51 within a connection string, I get the
    following error:
    "Couldn't find installable ISAM". If using Jet 4.0, I don't get the error
    and I can process dbf file.
    Any clues...?

    In answer to your first question, you can use ADO with the Jet 3.51 provider.

    The ISAM problem either means that the driver isn't installed, or the entry in the Registry is
    incorrect. Take a look at the following key and also verify that the ISAM file is installed:

    HKLM\Software\Microsoft\Jet\3.5\Engines\Xbase


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  8. #8
    jj Guest

    Re: dbf file formats in VB


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:

    >The ISAM problem either means that the driver isn't installed, or the entry

    in the Registry
    >is
    >incorrect. Take a look at the following key and also verify that the ISAM

    file is installed:
    >
    >HKLM\Software\Microsoft\Jet\3.5\Engines\Xbase
    >


    I write/ask:
    Is "HKLM\Software\Microsoft\Jet\3.5\Engines\Xbase" the location\entry\key
    within the Registry?
    What is the correct setting in the Registry?
    Where does one look specifically to check if driver is installed?

  9. #9
    JJ Guest

    Re: dbf file formats in VB


    Also, since I don't feel like changing or accessing the Registry (no confidence),
    I would like to pursue the OLE DB 3.51 route. Since I am using VB6 and (Office)
    ACCESS 2000, where can I get a 3.51 driver? Can 3.51 and 4.0 reside on the
    same machine without causing any compatiability problems?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center