Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

vb6 reading foxpro database with SQL - field type adDBDate

22 vues
Accéder directement au premier message non lu

Bart Deraedt

non lue,
30 déc. 2001, 14:27:0730/12/2001
à
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]

non lue,
31 déc. 2001, 14:43:1531/12/2001
à

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

non lue,
31 déc. 2001, 15:36:3231/12/2001
à
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]

non lue,
31 déc. 2001, 15:48:1831/12/2001
à

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 nouveau message