我的网页是asp,数据库是mysql打开网页的时候出现错误提示:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'[MySQL][ODBC 5.1 Driver][mysqld-5.1.48-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1/common/checkUser.asp,行 220
错误的代码行:
Conn.Execute("update blog_Counter set coun_Time=#"&Now()&"#,coun_IP='"&Guest_IP&"',coun_OS='"&Guest_Browser(1)&"',coun_Browser='"&Guest_Browser(0)&"',coun_Referer='"&HTMLEncode(CheckStr(Guest_Refer))&"' where coun_ID="&tmpLC)麻烦大侠们看看,到底有什么问题
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'[MySQL][ODBC 5.1 Driver][mysqld-5.1.48-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1/common/checkUser.asp,行 220
错误的代码行:
Conn.Execute("update blog_Counter set coun_Time=#"&Now()&"#,coun_IP='"&Guest_IP&"',coun_OS='"&Guest_Browser(1)&"',coun_Browser='"&Guest_Browser(0)&"',coun_Referer='"&HTMLEncode(CheckStr(Guest_Refer))&"' where coun_ID="&tmpLC)麻烦大侠们看看,到底有什么问题
Conn.Execute("update blog_Counter set coun_Time=#"&Now()&"#,coun_IP='"&Guest_IP&"',coun_OS='"&Guest_Browser(1)&"',coun_Browser='"&Guest_Browser(0)&"',coun_Referer='"&HTMLEncode(CheckStr(Guest_Refer))&"' where coun_ID="&tmpLC)
update blog_Counter set coun_Time=#"&Now()&"#,coun_IP='"&Guest_IP&"',coun_OS='"&Guest_Browser(1)&"',coun_Browser='"&Guest_Browser(0)&"',coun_Referer='"&HTMLEncode(CheckStr(Guest_Refer))&"' where coun_ID="&tmpLC
response.end
Conn.Execute("update blog_Counter set coun_Time=#"&Now()&"#,coun_IP='"&Guest_IP&"',coun_OS='"&Guest_Browser(1)&"',coun_Browser='"&Guest_Browser(0)&"',coun_Referer='"&HTMLEncode(CheckStr(Guest_Refer))&"' where coun_ID="&tmpLC)
改为哪上,然后贴执行显示的语句是什么,你可以自己到MYSQL中测试你的SQL语句,应该是语法有错误。
update blog_Counter set coun_Time=#19/12/2012 22:04:56#,coun_IP='124.64.6.51',coun_OS='Windows NT',coun_Browser='Internet Explorer[MSIE 9.0]',coun_Referer='http://www.yilv.net/' where coun_ID=3139
建议你按照7楼已经讲过的方法,直接把语句放在MYSQL中执行,MYSQL会直接告诉你哪儿有问题。 而不是大家仅通过眼睛来猜