Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data type mismatch err while updatting numeric field in Sql
Message
De
24/11/2004 00:58:36
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Data type mismatch err while updatting numeric field in Sql
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00964136
Message ID:
00964136
Vues:
41
Dear all

I m trying to insert a numeric and an integer value to the SQL Database
using SQL Execute Command all Charector type values are upadated properly
But, when it reach to numeric variable it shows an error that 'Data Type Mismatch Error'.
Then how will i insert numeric value in to the databse.

Sample code is given below

cItmCod = 'A1B1C1'
cItmDes = 'Mechine Part '
nQty = 100.000 (Numeric)
nGrpNo = 1 (Integer)

cSqlDb.BeginTrans()
cStr = "Insert Into PrtMst(ItmCod,ItmDes,Qty,GrpNo) Values
("+"'"+cItmCod+"',"+"'"+cItmDes +"',"+"'"+nQty +"','"+nGrpNo +"')"
cSqlDb.Execute(cStr)
cSqlDb.CommitTrans

Please help me anybody have a solution for it

Thanks and Regards
Abdulla
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform