D
DraguVaso
Hi,
I want to insert some recors in an Sql Server which have some decimal
values:
For exemple: I have a vairable called sngPi = 3,1415 (european notation:
"," = comma)
When I build my SQL-statement dynamically like:
strSQL = "INSERT INTO tblBlabla (MyName, Pi) VALUES ('Pieter', " & sngPi &
")"
But: the result is offcourse: "INSERT INTO tblBlabla (MyName, Pi) VALUES
('Pieter', 3,1415)" which gives me an error that I want to insert 2 values,
and have only one field.
So I actually should insert it as ""INSERT INTO tblBlabla (MyName, Pi)
VALUES ('Pieter', 3.1415)" to work fine.
I could 'build' my variable as a string by taking the first part,
concattenating a point, and than concatenate the last part, but I guess
there must be a nicer and better way to work arround this problem. I want a
solution that works in every case, independent of the regional settings on
the application-pc and the sql-server.
Anybody any idea?
Thansk a lot in advance!
Pieter
I want to insert some recors in an Sql Server which have some decimal
values:
For exemple: I have a vairable called sngPi = 3,1415 (european notation:
"," = comma)
When I build my SQL-statement dynamically like:
strSQL = "INSERT INTO tblBlabla (MyName, Pi) VALUES ('Pieter', " & sngPi &
")"
But: the result is offcourse: "INSERT INTO tblBlabla (MyName, Pi) VALUES
('Pieter', 3,1415)" which gives me an error that I want to insert 2 values,
and have only one field.
So I actually should insert it as ""INSERT INTO tblBlabla (MyName, Pi)
VALUES ('Pieter', 3.1415)" to work fine.
I could 'build' my variable as a string by taking the first part,
concattenating a point, and than concatenate the last part, but I guess
there must be a nicer and better way to work arround this problem. I want a
solution that works in every case, independent of the regional settings on
the application-pc and the sql-server.
Anybody any idea?
Thansk a lot in advance!
Pieter