Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sent variable as float to SQL Sever
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Sent variable as float to SQL Sever
Miscellaneous
Thread ID:
00921474
Message ID:
00921474
Views:
67
Hi all!

because the error occurs?

begin code

nCon = SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=MY SERVER;UID=SA;PWD=;DATABASE=NORTHWIND")

=SQLEXEC(nCon,"USE NORTHWIND")

m.cProduct = "Chocolade"
m.nProductLen = 1
=SQLEXEC(nCon,"select * from products where productname like substring(?m.cProduct,1,?m.nProductLen)","prod")

LOCAL laError(5)
AERROR(laError)
MESSAGEBOX(laError[1,2])

* laError[1,2] = Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Argument data type float is invalid for argument 3 of substring function.

end code

Antonio
Next
Reply
Map
View

Click here to load this message in the networking platform