菜鸟问题....我是初学者,求教!!!

hujing008 2006-03-22 03:10:57
我在调试网上下的一个购物车程序。。
建一个记录。。但是调试错误。。提示

错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

-----------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn.asp" -->
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECT * FROM pro_table"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
。。。
--------------------------------------------------------
...全文
68 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
hujing008 2006-03-22
  • 打赏
  • 举报
回复
重新启动了一下。。sql 可以了。害的我郁闷了好久。。
hujing008 2006-03-22
  • 打赏
  • 举报
回复
真的有啊~~~~~~~郁闷
  • 打赏
  • 举报
回复
自己查查bobo这个库里是否有pro_table这个表
md5e 2006-03-22
  • 打赏
  • 举报
回复
你看下数据库是否有pro_table这个表
或是你的表名写错了
hujing008 2006-03-22
  • 打赏
  • 举报
回复
help me .......顶

cnn.asp

<%
set conn = Server.CreateObject("ADODB.Connection")
MM_conn_STRING = "Driver={SQL Server};Server=new;Database=bobo;Uid=sa;Pwd=123;"
conn.ConnectionTimeout = 15
conn.CommandTimeout = 10
conn.Open MM_conn_STRING
%>
这里有问题没?
hujing008 2006-03-22
  • 打赏
  • 举报
回复
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
[Microsoft][ODBC SQL Server Driver][SQL Server]对象名 'pro_table' 无效。
/huj1/新建文件夹/index.asp, 第 10 行
hujing008 2006-03-22
  • 打赏
  • 举报
回复
谢谢!! 又出现了这个错误~~~~

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
[Microsoft][ODBC SQL Server Driver][SQL Server]对象名 'pro_table' 无效。

我在库里建了一个pro_table的表,啊!!!


jspadmin 2006-03-22
  • 打赏
  • 举报
回复
Recordset1.CursorType = 1
hujing008 2006-03-22
  • 打赏
  • 举报
回复
以下是全部代码 index.asp

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn.asp" -->
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECT * FROM pro_table"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="583" border="0" cellspacing="0" cellpadding="0">
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr>
<td width="140"><%=(Recordset1.Fields.Item("id").Value)%></td>
<td width="171"><%=(Recordset1.Fields.Item("proname").Value)%></td>
<td width="272"><%=(Recordset1.Fields.Item("simages").Value)%></td>
<td width="272"><a href="cart.asp?ProductID=<%=(Recordset1.Fields.Item("id").Value)%>&quantity=1">购买</a></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
Recordset1.Close()
%>

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧