Results 1 to 1 of 1

Thread: dbf to access

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Worldwide in the Sun
    Posts
    566

    Question dbf to access

    Hi all,

    I found following code on this forum :
    Connectionstring are fro Si_the_Geek.

    VB Code:
    1. Private Sub Form_Load()
    2. Dim cn As ADODB.Connection
    3. Dim rs As ADODB.Recordset
    4.  
    5.     Set cn = New ADODB.Connection
    6.      cn.ConnectionString = "Driver={Microsoft dBASE Driver(*.dbf)};DriverID=277;" _
    7.       & "Dbq=C:\aaa;"
    8.    
    9.     cn.Open
    10.    
    11.     Set rs = New ADODB.Recordset
    12.     rs.Open "soort", cn, adOpenKeyset, adLockPessimistic, adCmdTable
    13.        
    14. rs.MoveFirst
    15. Do Until rs.EOF = True
    16. Debug.Print rs.Fields("field1")
    17. rs.MoveNext
    18. Loop
    19. rs.MoveFirst
    20.  
    21.  
    22.  
    23. ' ***********************************************
    24.  
    25. 'visual basic code:
    26. '________________________________________
    27. '    cn.ConnectionString = "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;" _
    28. '      & "Dbq=C:\aaa;"
    29. '________________________________________
    30. 'or:
    31. 'visual basic code:
    32. '________________________________________
    33. '    cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
    34. '      & "Data Source=C:\aaa;" _
    35. '      & "Extended Properties=dBASE IV;User ID=Admin;Password="
    36. '________________________________________
    37.  
    38.  
    39. ' ********************************************************
    40. End Sub

    My inputfiles are clipper .dvf, .cdx and .fpt files.
    The connection wiil not establish with those drivers.
    Are there other drivers needed for clipper files?

    I attached a zip file with those clipper files.

    grtz
    Ray
    Attached Files Attached Files
    Last edited by marex; Apr 21st, 2006 at 09:11 AM.
    Ray

Posting Permissions

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



Click Here to Expand Forum to Full Width