[URGENT] Error incorrect syntax near

D

Dax

When i insert some values float in a form made with ASP
appear an error message like this:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near ','.

sql="select id from tbl_monete where id_taglio="&idtaglio
rs1.open sql, conn

idTaglio it's the value of money that can be like 0,5 0,2,
0,1 etc etc
If i try one or two times it'll work correctly, why?
Table tbl_monete has field id_taglio that is float.
What can I do?

Thanks,
Daniele
 
B

Bob Barrows [MVP]

Dax said:
When i insert some values float in a form made with ASP
appear an error message like this:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near ','.

sql="select id from tbl_monete where id_taglio="&idtaglio
rs1.open sql, conn

idTaglio it's the value of money that can be like 0,5 0,2,
0,1 etc etc
If i try one or two times it'll work correctly, why?
Table tbl_monete has field id_taglio that is float.
What can I do?
Use a period to delimit the decimal instead of a comma. Better yet, use
parameters:
http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e

Personally, I prefer using stored procedures:
http://groups.google.com/group/microsoft.public.inetserver.asp.general/msg/5d3c9d4409dc1701?hl=en
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top