Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    1

    Unanswered: dBase to MS Access through VB app

    Hi all,

    I'm currently working on a gateway between a dbase 5 database from an ERP, and I wish to put some datas to an Access one using SQL instructions.

    I have absolutely no problems connecting to my Access database, but I cannot connect to the dBase one using this code :

    Dim Con2 As ADODB.Connection
    Dim Rec2 As ADODB.Recordset
    Set Con2 = New ADODB.Connection
    Set Rec2 = New ADODB.Recordset
    Dim Sql2 As String

    Sql2 = "SELECT * FROM PP407.dbf WHERE TYPE = 06"
    Con2.Open "Driver={Microsoft dBASE Driver (*.dbf)};" & _
    "DriverID=277;" & _
    "Dbq=C:\Program Files\Prélude 5\EXEMPLE;"
    Rec2.Open Sql2, Con2, adOpenStatic, adLockOptimistic

    Can you help me please ?

  2. #2
    Join Date
    Oct 2002
    Location
    Cape Town, South Africa
    Posts
    253
    Just a quick question? Why do you need the VB app? You can use linked tables if you dont need a separate copy of the data or if you do want a separate copy of the data then use Accesses import functions or even the Access replication functions. If you have Oracle and if dBase has an odbc driver (must have), you can create an Oracle gateway. No code required! 10 minutes configuration. Just an idea, use it... dont use it... you know....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •