标题:(求助)ASP奇怪的问题
只看楼主
lymttt
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-6-12
 问题点数:0 回复次数:2 
(求助)ASP奇怪的问题

(求助)奇怪的问题;

小妹是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>

搜索更多相关主题的帖子: ASP 
2005-07-27 08:43
hxfly
Rank: 5Rank: 5
等 级:贵宾
威 望:17
帖 子:5807
专家分:108
注 册:2005-4-7
得分:0 
&lt;%=request.form("content")%&gt;
这样看看有没有取到值

2005-07-27 08:53
w_x_s_166
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-7-27
得分:0 
[注意]
   comm.activeconnection 语法错误  
   改为  set comm.activeconnection=链结对象
2005-07-27 09:53



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-23738-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.841837 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved