Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

vb6 reading foxpro database with SQL - field type adDBDate

22 views
Skip to first unread message

Bart Deraedt

unread,
Dec 30, 2001, 2:27:07 PM12/30/01
to
maybe you should use the "Variant"-datatype in VB

this datatype can contain almost anything

"Linda White" <linda...@emporiumonline.com> wrote in message
news:3a2901c19011$5b91cc50$35ef2ecf@TKMSFTNGXA11...
> I am new to Visual Basic and am faced with the task of
> reading records in a Foxpro database for specific dates.
> The field type is adDBDate. There must be some way to do
> this. I am able to connect and read records using the
> other fields, but not adDBDate type fields.
>
> Can anyone help?


Douglas Laudenschlager [MS]

unread,
Dec 31, 2001, 2:43:15 PM12/31/01
to

Linda,

Can you tell us more about what you mean when you say that you "can't read"
date fields in a Foxpro database file? I'm sure you don't mean that a
SELECT statement fails to retrieve them...

-Doug


This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Linda White

unread,
Dec 31, 2001, 3:36:32 PM12/31/01
to
Yes, the select statement fails to retrieve records when I
specify a specific date. Select * from Brekfile where
emplid = '086040' and timedate = 03/28/00 returns the
following when opening the record set.
[Microsoft][ODBC Visual FoxPro Driver]Operator/operand
type mismatch. -2147217913

timedate As Date The field type in the foxpro database is
adDBdate 133 (yyyymmdd). Looking at the raw date, it is
yyyymmdd format and the record exists.

>.
>

Douglas Laudenschlager [MS]

unread,
Dec 31, 2001, 3:48:18 PM12/31/01
to

Have you tried single quotes around the date constant? I don't have a
ready-to-test Foxpro sample set up, but that's what you would need with SQL
Server...

Select * from Brekfile where emplid = '086040' and timedate = '03/28/00'

0 new messages