回复:(jsl_9_14)[求助]asp中写入数据库出错
谢谢8楼的兄弟,问题终于解决了,就是使用8楼兄弟的方法.
今天又学到一招:添加记录除了用"INSERT INTO"外,还可以"ADDNEW".看来够得学哟!!
终于可以睡个好觉了,这个问题困绕了好几天了.
再次谢谢了,给这个问题出主意的所有兄弟!!!
睡觉去啰!!!!!
GOD 你们搞什么飞机啊
[求助]asp中写入数据库出错<%
set conn=server.createObject("ADODB.Connection")
dbpath=server.mappath("../mdba/news.asp")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbpath
set rs=server.createobject("adodb.recordset")
conn.execute insert into news(classfication,title,accessory,imagesname,key1,key2,reporter,lookfrom,newsdate,content)values("a","b","c","j","d","e","f","g",h,"i")
%>
这段代码中问题出在conn.execute insert intonews(classfication,title,accessory,imagesname,key1,key2,reporter,lookfrom,newsdate,content)values("a","b","c","j","d","e","f","g",h,"i")这一句代码中,老是出错,说语句未结束.这其中a,b,c,d,e,f,g,j是一个字符型变量,h是时间变量,i是注释型变量.这几个变量的值都是从另一个数据库中得来.
请高手们帮帮忙,看一下是怎么回事,小弟是一个新手.最好能把正确的代码写出来.先谢谢了!!!
下划线那行根本不是VBS的语法嘛