• 0

VB6 and .dbf file , ADODB


Question

i've manage to create connection with

Private Sub Form_Load()
Dim cnDBF As New ADODB.Connection
cnDBF.Open "Provider=MSDASQL.1;Persist Security Info=False;DSN=Visual FoxPro Database;UID=;SourceDB=c:\EAS;SourceType=DBF;Exclusive=No;Background;Fetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
Dim rs    As New ADODB.Recordset
rs.Open "Select * From PDATA", cnDBF, adOpenKeyset, adLockPessimistic
End Sub

is't correct?

AND

how i retrieve data?

Link to comment
https://www.neowin.net/forum/topic/377637-vb6-and-dbf-file-adodb/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

As for the connection string, I dont know for sure. you can always check www.connectionstrings.com

As for retrieving info, you have it already, well mostly...

rs.Open "Select * From PDATA", cnDBF, adOpenKeyset, adLockPessimistic

Do until rs.EOF

MsgBox rs.Fields("FIELDNAME").Value

rs.MoveNext

Loop

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.