Hata:
Çözüm:Microsoft OLE DB Provider for SQL Server error '80040e07'
Syntax error converting the varchar value '15 having 1=1;--' to a column of data type int.
/default.asp, line 61
http://www.xxx.com/default.asp?id=15' having 1=1;--
Kaynak:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=243810&SiteID=1
Alıntı:
- Syntax error converting the varchar value 'a' to a column of data type intI have a table(tab1) with a column(col1) of type varchar. I insert a row with an integer value(1). And when i query the table using the sql, select col1 from tab1 where col1 = 1, it works fine.
But after i insert a varchar, say 'a' and then do the same query, i get an error message saying, "Syntax error converting the varchar value 'a' to a column of data type int.". Why is this so? Please reply.
- Try select col1 from tab1 where col1 = '1'
The ' around the 1 tells SQL server it is comparing the charater 1 not the number 1
Hiç yorum yok:
Yorum Gönder