Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.50-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 /admin/add_good_do.asp,行 20 代码:
<html>
<head>
<title>学生信息</title>
</head>
<body>
<!--#include file="../conn.asp"-->
<%
tmpid =request.Form("ID")
tmpname =request.Form("goodname")
tmpprice =request.Form("price")
tmpsort =request.Form("sort")
tmpbrand =request.Form("brand")
tmpnum =request.Form("num")
tmpin= request.Form("in")dim rs, strrs
set rs = server.CreateObject("adodb.recordset")
strrs = "insert into good(ID,name,price,sort,brand,num,pricein) values('"&tmpid&"','"&tmpname&"',"&tmpprice&",'"&tmpsort&"','"&tmpbrand&"',"&tmpnum&","&tmpin&")"rs.open strrs, conn//此处为20行
response.write "<script language=JavaScript>" & "alert('添加成功!');" &"history.back()" & "</script>" %>
</body>
</html>本人乃菜鸟,请高手指教
[MySQL][ODBC 5.1 Driver][mysqld-5.1.50-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 /admin/add_good_do.asp,行 20 代码:
<html>
<head>
<title>学生信息</title>
</head>
<body>
<!--#include file="../conn.asp"-->
<%
tmpid =request.Form("ID")
tmpname =request.Form("goodname")
tmpprice =request.Form("price")
tmpsort =request.Form("sort")
tmpbrand =request.Form("brand")
tmpnum =request.Form("num")
tmpin= request.Form("in")dim rs, strrs
set rs = server.CreateObject("adodb.recordset")
strrs = "insert into good(ID,name,price,sort,brand,num,pricein) values('"&tmpid&"','"&tmpname&"',"&tmpprice&",'"&tmpsort&"','"&tmpbrand&"',"&tmpnum&","&tmpin&")"rs.open strrs, conn//此处为20行
response.write "<script language=JavaScript>" & "alert('添加成功!');" &"history.back()" & "</script>" %>
</body>
</html>本人乃菜鸟,请高手指教
response.end
rs.open strrs, conn//此处为20行
set rs = server.CreateObject("adodb.recordset")
sql="update good set name='"&tmpname&"',price="&tmpprice&",sort='"&tmpsort&"',brand='"&tmpbrand&"',num="&tmpnum&",pricein="&tmpin& "where ID='"&tmpid&"'"conn.execute sql[MySQL][ODBC 5.1 Driver][mysqld-5.1.50-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 'sort='',brand='',num=,pricein=where ID=''' at line 1数据库应该是连接上,它说语法有问题,但是我把语句放到Mysql里是可以运行的。但在网页中却出项这样的问题,这到底是怎么回事!
update good set name='',price=,sort='',brand='',num=,pricein= where ID=''
这个语言有问题吗?