Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change fieldtype sql - select
Message
 
To
18/05/2008 04:25:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01317905
Message ID:
01317993
Views:
10
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform