Home > Database > Mysql Tutorial > body text

asp执行sqlserver的insert into语句出现逗号错误

WBOY
Release: 2016-06-07 15:25:41
Original
1456 people have browsed it

谢谢你,你的意见提醒了我使用这语句: response.write(sql) '在这里输出一下sql语句 , 看看哪里有没有问题 response.end ' 停止 如下: sql="Insert InTo member2011(name,telphone,number,college,classname,iscadre,remark,position) values('"+sname+"',

谢谢你,你的意见提醒了我使用这语句:

response.write(sql) '在这里输出一下sql语句 , 看看哪里有没有问题
response.end ' 停止

如下:

sql="Insert InTo member2011(name,telphone,number,college,classname,iscadre,remark,position) values('"+sname+"','"+telphone+"','"+snumber+"','"+college+"','"+classname+"',"+iscadre+",'"+remark+",'"+position+"')"
response.write(sql) '在这里输出一下sql语句 , 看看哪里有没有问题
response.end ' 停止
Conn.Execute(sql)
Conn=nothing
Conn.Close

让我知道了问题所在,是因为我把那些变量放在了一个sub里面,成了局部变量,所以就在这个sub里面,那些变量为空。从而出问题了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template