Home > Archive > Visual FoxPro SQL Queries > September 2005 > Cannot retrieve records from DBF through OLEDB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Cannot retrieve records from DBF through OLEDB
Marcelo

2005-09-27, 8:25 pm

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|S
hare Deny
None;Password='';Col
lating Sequence=MACHINE"

cnn1.Open strCnn

' Open table
Set rst1 = New ADODB.Recordset
datFecha = "2004/12/30"
datFecha1 = FormatDateTime(datFe
cha, 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.


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com