[求助]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是注释型变量.这几个变量的值都是从另一个数据库中得来.
请高手们帮帮忙,看一下是怎么回事,小弟是一个新手.最好能把正确的代码写出来.先谢谢了!!!
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是注释型变量.这几个变量的值都是从另一个数据库中得来.
请高手们帮帮忙,看一下是怎么回事,小弟是一个新手.最好能把正确的代码写出来.先谢谢了!!!