>Theo,
>
>Does MySQL have a cast() type function? If so I like to use it to make sure I get the data type I want.
>
>
select cast(0 as int) as fld1, ....
>
It does have a cast function, but as I've already written in the first post it doesn't do any good. The problem is in MyODBC driver (all versions).
I usually do something like this :
select 0 as sel,* from xtable into cursor RsltTable, when I want to add a column that will be used for checking-selecting records.
Anyway, the solution I've come up so far is to create a temporary table with explicit casting for the new fields that I want, and then select this table into vfp.
Something like this :
create temporary table tRsltTable as select cast(0 as unsigned) as sel,a.* from xtable a;
select * from tRsltTable;
(ofcourse you should use them via sqlexec, or with an adapter class if you use one..)
ps. mysql doesn't support the "select .... into #table" syntax tha msSql has, so I use the "create temporary..." thing.
Hope this is usefull to other coders...