Marcelo
2005-09-27 23:09:56 UTC
Hi, I just want to retrieve some records from a DBF file to a recordset
throgh VB6 and I get 0 records when I should get a set of them.
This is the code:
Set cnn1 = New ADODB.Connection
strCnn = "Provider=VFPOLEDB.1;Data
Source=C:\Lince\DBF\mer.dbf;Mode=ReadWrite|Share Deny
None;Password='';Collating Sequence=MACHINE"
cnn1.Open strCnn
' Open table
Set rst1 = New ADODB.Recordset
datFecha = "2004/12/30"
datFecha1 = FormatDateTime(datFecha, vbShortDate)
strSQL = "select * from mer where fchr = {^" & datFecha1 & "}"
rst1.Open strSQL, cnn1, adOpenKeyset, adLockOptimistic, adCmdText
Why is it that I get no records? Is it a problem of this provider driver? I
can easily manage a set of records like this with DAO with Data Control but
that's not the idea since I use over a million records and I want to do it
as fast as possible.
Hope you can help me to figure this out. Thanks in advance, Marcelo.
throgh VB6 and I get 0 records when I should get a set of them.
This is the code:
Set cnn1 = New ADODB.Connection
strCnn = "Provider=VFPOLEDB.1;Data
Source=C:\Lince\DBF\mer.dbf;Mode=ReadWrite|Share Deny
None;Password='';Collating Sequence=MACHINE"
cnn1.Open strCnn
' Open table
Set rst1 = New ADODB.Recordset
datFecha = "2004/12/30"
datFecha1 = FormatDateTime(datFecha, vbShortDate)
strSQL = "select * from mer where fchr = {^" & datFecha1 & "}"
rst1.Open strSQL, cnn1, adOpenKeyset, adLockOptimistic, adCmdText
Why is it that I get no records? Is it a problem of this provider driver? I
can easily manage a set of records like this with DAO with Data Control but
that's not the idea since I use over a million records and I want to do it
as fast as possible.
Hope you can help me to figure this out. Thanks in advance, Marcelo.