I'm trying to retreive a character field as a numeric from a FoxPro free table using ADO inside Visual Basic code. The query:
"Select A, Cast (B as numeric) from c:\test.dbf"
yields the following error message:
Function name is missing ).
Any ideas
I'm trying to retreive a character field as a numeric from a FoxPro free table using ADO inside Visual Basic code. The query:
"Select A, Cast (B as numeric) from c:\test.dbf"
yields the following error message:
Function name is missing ).
Any ideas
CAST Problem using ADO
GreyGallon
Jonathas Oliveira
In addition to Cetin's siggestion I think you have to specify the domain in detail in a CAST():
Thus: CAST( B AS Numeric(10,2))
There is a table in the VFP Help file topic on CAST() which shows which data types take Width/Precision values ad Numeric is certainly one of them.
sameerTripathi