| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1017 人关注过本帖
标题:rs.open sql conn,1,3 错误 为什么
只看楼主 加入收藏
inking0801
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2011-1-28
结帖率:40%
收藏
已结贴  问题点数:10 回复次数:6 
rs.open sql conn,1,3 错误 为什么
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/CONN.asp" -->


<%
Set rs=Server.CreateObject("ADODB.Recordset")
sqL="select cpel_time,cpel_biaoti,cpel_djs,cpel_nr,cpel_ss_cpyl,img FROM dbo.CPEL"
rs.open sql conn,1,3  
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
红色字段 sql数据库,

cpel_biaoti=Request.Form("cpel_biaoti")
img=Request.Form("img")
cpel_nr=Request.Form("cpel_nr")
cpel_djs=Request.Form("cpel_djs")
cpel_ss_cpyl=Request.Form("cpel_ss_cpyl")

if cpel_biaoti=""  then
response.Write("<script language=javascript>alert('产品标题不能为空!');history.go(-1)</script>")
response.end
end if
if img=""  then
response.Write("<script language=javascript>alert('示例图片不能为空!');history.go(-1)</script>")
response.end
end if
if cpel_nr=""  then
response.Write("<script language=javascript>alert('产品介绍不能为空!');history.go(-1)</script>")
response.end
end if
rs.addnew
rs("cpel_biaoti")=cpel_biaoti
rs("img")=img
rs("cpel_nr")=cpel_nr
rs("cpel_djs")=cpel_djs
rs("cpel_ss_cpyl")=cpel_ss_cpyl
rs("cpel_time")=now()
rs.update
rs.close
set rs = nothing
conn.Close()
Set rs = Nothing
%>
<%
Response.Write "<script>alert('产品增加成功!点击继续添加!');window.location.href='ind.asp';</script>"
%>
搜索更多相关主题的帖子: 数据库 
2011-02-04 17:32
inking0801
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2011-1-28
收藏
得分:0 
没人回答啊
2011-02-04 17:41
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:10 
rs.open sql,conn,1,3
2011-02-04 23:12
inking0801
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2011-1-28
收藏
得分:0 
回复 3楼 aspic
呵呵  修改的时候忘记改回去啦
 rs.open sql,conn,1,3
报的就是那个错误
2011-02-04 23:44
inking0801
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2011-1-28
收藏
得分:0 
回复 3楼 aspic
版主 我把前一页的代码页发过去 帮我看看  搞了一天啦
数据表里还有一个CPEL_ID但是这个也不影响啊

下面是代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<script language="javascript">
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
var arr = showModalDialog("eWebEditor/dialog/i_upload.htm?style=popup&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");}
</script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<h1 align="center">添加新产品</h1>
<p>&nbsp;</p>
<form id="form1" name="myform" method="post" action="a_cp_pass.asp">
  <table width="961" height="626" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#D9E1E6">
    <tr>
      <th height="30" colspan="2" align="left" scope="col">正在添加新的<span class="STYLE1"><%= Trim(Request.QueryString("name")) %></span>所属ID为<span class="STYLE1"><%= Trim(Request.QueryString("ylid")) %></span>。</th>
    </tr>
    <tr>
      <td width="194" height="40" align="right">产品标题</td>
      <td width="765"><input type="text" name="cpel_biaoti" id="cpel_biaoti" />
   
      <input type="hidden" name="cpel_ss_cpyl" id="cpel_ss_cpyl" value="<%= Trim(Request.QueryString("ylid")) %>" />      </td>
    </tr>
    <tr>
      <td height="39" align="right">示例图片</td>
      <td><input type=text name=img size=50> <input type=button value="上传图片" onClick="showUploadDialog('image', 'myform.img', '')"> </td>
    </tr>
    <tr>
      <td height="320" align="right" valign="top">产品介绍</td>
      <td><input type="hidden" name="cpel_nr" id="cpel_nr" />
        <iframe id="eWebEditor1" src="eWebEditor/ewebeditor.htm?id=cpel_nr&style=blue" frameborder="0" sc
rolling="no" width="668" height="468"></iframe></td>
    </tr>
    <tr>
      <td height="43" align="right">产品点击数</td>
      <td><input type="text" name="cpel_djs" id="cpel_djs" /></td>
    </tr>
    <tr>
      <td height="43">&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="确认提交" /></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

2011-02-04 23:48
inking0801
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2011-1-28
收藏
得分:0 
此问题以解决
2011-02-05 18:52
cwwbaby
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-2-9
收藏
得分:0 
解决方法能大家分享吗??
我也碰到此类问题
2011-03-11 08:35
快速回复:rs.open sql conn,1,3 错误 为什么
数据加载中...
 
   



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

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