Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data type mismatch err while updatting numeric field in Sql
Message
From
24/11/2004 00:58:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Data type mismatch err while updatting numeric field in Sql
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00964136
Message ID:
00964136
Views:
42
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
Next
Reply
Map
View

Click here to load this message in the networking platform