Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC(), value parameters and conversion
Message
From
19/09/2003 12:59:13
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00830709
Message ID:
00830716
Views:
22
Thanks Esparta,

I'm getting an error 'Arithmetic overflow error converting float to data type numeric'... which makes me believe that there is more to it than just having the right type (Numeric, Character, Date).

Do you have any further suggestions to look for based upon this more complete exposition of my problem?

Thanks for any help!

Andrew

>>Can anybody point me to a resource which will help me understand how to present variables to SQL Server 2000 using the Visual FoxPro SQLEXEC() statement, particularly interested in the variations of datatype, ie: TINYINT, INT, NUMERIC, DATATIME, etc.?
>
>lnIID = MyTable.IID
>lcQuery = "SELECT * FROM myBigTable WHERE iid=?lnIID"
>IF SQLExec(lnHandle,lcQuery,"MyCursor") > 0
>   BROW
>ELSE
>   **** Use AERROR() function
>ENDIF
>
>
>ldInitialDate = DATE(2003,09,18)
>ldFinalDate   = DATE(2003,09,20)
>
>lcQuery = "SELECT * FROM Ventas WHERE dDate BETWEEN ?ldInitalDate AND ?ldFinalDate "
>IF SQLExec(lnHandle,lcQuery,"MyCursor") > 0
>   BROW
>ELSE
>   *** Use AERROR() Function
>ENDIF
>
>lcText = "Hello World"
>ldDate = DATETIME()
>lnID   = MyTable.iID
>lcQuery = "INSERT INTO myTable(nID,cText,dDate) VALUES (?lnID,?lcText,?ldDate)"
>IF SQLEXEC(lnHandle, lcQuery) < 0
>   **** Error, use AERROR()
>ENDIF
>
>
On a CLEAR day you can see forever.
Previous
Reply
Map
View

Click here to load this message in the networking platform