Question for Sql (HOT)

vagelisr

Registered User.
Local time
Tomorrow, 01:47
Joined
Apr 28, 2011
Messages
87
Hi to all

I have a huge problem
I use this sql ( sSql = "SELECT capacity_pieces_sec FROM capacity WHERE capacity_material_code= '" & bkpdwnH_material_code & "' and capacity_machn_code= '" & bkpdwnH_machn_code & "' and capacity_number_employee =" & bkpdwnH_number_employee)
but my last field is decimal and i receive a run time error because of the , (comma)
What is the correct syntax to understand my SQL the last field???
my last field has value 2,5
Thanks and regards!!!!!!!!
 
Try a . instead of a ,

Decimals are represented as 2.5
 
In my case it does not represented as 2.5 but as 2,5 (for this reason i face the error)

Tha value 2,5 is from my last field.....
 
Then use
Code:
CDbl(Replace("2,5", ",", "."))
 
Okay that is just a work around.. The main question here is why do you have a comma instead of the regular .?
 

Users who are viewing this thread

Back
Top Bottom