>Sergey,
>
>Indeed lnResult gives -1.
>I am using a mySQL Database with VFP9.
>Tried various options of cast but dont seem to be able to find the correct syntax to convert a mySQL.characterfield with possible .null. values into a correct VFP.datetime , nor the mySQL.charaterfield and into VFP.logical.
>Have now constructed something which does the job by means of a second cursor.
>So problem solved.
>
>Thanks for support.
>
>Best regards,
>
>Koen
Koen,
I am pretty sure that .T. and .F. wouldn't work in any other database that VFP. Cast the field to BIT, VFP will do the other conversion for you.
TEXT TO sqltxt noshow pretext 15 TEXTMERGE
select
CAST(coalesce(online,1) as bit) as online ,
CAST(coalesce(tlupdate,0) as DateTime) as tlUpdate
from HORSART_WORKS
ENDTEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.