(求助)奇怪的问题;
小妹是ASP初学者,写了个往SQL SEVER数据库里写东西的代码,可是除了自动编号能产生以外,其他各字段全是空的,但是表里面又不显示"NULL"就只是一点东西都没有,请问那位大哥知道是什么问题?谢谢!
代码如下:
<html> <head> <title>无标题文档</title> </head> <body> <% dim conn,connstr connstr="provider=sqloledb;" & _ "driver={SQL SERVER};" & _ "server=(local);" & _ "uid=sa;" & _ "pwd=3326;" & _ "database=lym;" set conn=server.createobject("ADODB.CONNECTION") conn.open connstr set comm=server.createobject("adodb.command") comm.activeconnection=conn
set rs=server.createobject("ADODB.recordset") %> <% dim newsclass_id dim title dim autor dim content dim nowtime dim sqll title=request.form("title") title=cstr(title) autor=request.form("autor") autor=cstr(autor) content=request.form("content") content=cstr(content) newstime=date newstime=cstr(newstime) sqll="insert into new(title,autor,content)values('"&title&"','"&autor&"','"&content&"')" comm.commandtext=sqll comm.commandtype=1 comm.execute response.redirect"insert_news2.asp" %> </body> </html>