[URGENT] Error incorrect syntax near
am 13.02.2007 09:32:10 von 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
Re: [URGENT] Error incorrect syntax near
am 13.02.2007 14:27:08 von reb01501
Dax wrote:
> 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.inetser ver.asp.db/msg/72e36562fee7804e
Personally, I prefer using stored procedures:
http://groups.google.com/group/microsoft.public.inetserver.a sp.general/msg/5d3c9d4409dc1701?hl=en
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.