Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sent variable as float to SQL Sever
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Sent variable as float to SQL Sever
Divers
Thread ID:
00921474
Message ID:
00921474
Vues:
66
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform