佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 996|回复: 10

请教asp programming 高手

[复制链接]
发表于 4-1-2008 12:09 PM | 显示全部楼层 |阅读模式
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open sConnStr
Set Rs1open =Server.createobject("ADODB.RECORDSET")
SQLopen = "Select * from tblPropertySale"
Rs1open.Open SQLopen,Conn,3,2,1
%>
            
<%
'Conn.Open(sConnStr)
'err = request.querystring("err")
'if case <> "" then
' case = request.querystring("empty")
' response.write empty
  'response.end
'end if
%>


<form name="frmsearch" action="index.asp" method=post>
<input type="hidden" name="search" value="top">
<td align=right>         
<table border="0" cellpadding="0" cellspacing="0" width="230" id="table14">
<td width="54">         
<img src="images/index_21.gif" width="54" height="32" alt=""></td>
<td width="108">
<input type="text" name="txtKeyword" size="25" class="arial8" style="border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #000000; border-bottom-width: 1px"></td>
<td width="22">
<p align="center">
<a href="javascript:document.frmsearch.submit();" >
<img src="images/index_23.gif" width="27" height="32" alt="" border="0"></a></td>
</table>        
         </td>         
         </form>
        </tr>
       </table>
       </td>
       <td width="9">
       <img src="images/index_24.gif" width="9" height="32" alt=""></td>
      </tr>
     </table>

请问这asp script有何错误?为什么会出现以下error呢?

Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
回复

使用道具 举报


ADVERTISEMENT

发表于 4-1-2008 01:20 PM | 显示全部楼层
偶试试一下。

Rs1open.Open SQLopen,Conn,3,2,1

试试换成

Rs1open.Open SQLopen,Conn,3,3
回复

使用道具 举报

 楼主| 发表于 4-1-2008 02:31 PM | 显示全部楼层

困惑

谢谢你的回复,但还是不能。或者你能教我写出类似的search function 吗?
回复

使用道具 举报

发表于 4-1-2008 02:48 PM | 显示全部楼层
原帖由 ahboon1108 于 4-1-2008 02:31 PM 发表
谢谢你的回复,但还是不能。或者你能教我写出类似的search function 吗?
突然发现。。。 你的connection 去了哪里?
connect 去mysql 还是 mssql 的。。。。
回复

使用道具 举报

 楼主| 发表于 4-1-2008 02:51 PM | 显示全部楼层
我是用access database 的。
回复

使用道具 举报

发表于 4-1-2008 03:05 PM | 显示全部楼层
你的 sConnStr=?????
和试看 Rs1open.Open SQLopen,Conn,3,1
回复

使用道具 举报

Follow Us
发表于 4-1-2008 03:14 PM | 显示全部楼层
回复

使用道具 举报

发表于 5-1-2008 06:56 PM | 显示全部楼层
原帖由 vampcheah 于 4-1-2008 03:14 PM 发表
http://www.webwizguide.com/kb/asp_tutorials/connecting_to_a_database.asp
自己看着办。。。 呵呵

没回应了吗,成不成都说声嘛
回复

使用道具 举报


ADVERTISEMENT

发表于 5-1-2008 10:19 PM | 显示全部楼层
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.

這個error type 好像是說你的recordset 里要拿的feild name 不對.
你應該是沒有放你的全部code吧...???
回复

使用道具 举报

发表于 8-1-2008 10:02 PM | 显示全部楼层
你没有set你的connection string, 还有你define的record set object有问题。试试找google,seach asp database connection,或去www.w3cschools.com
回复

使用道具 举报

 楼主| 发表于 15-1-2008 11:44 AM | 显示全部楼层
谢谢诸位高手的挺立相助, 但这问题我先暂且搁下。因为我在执行着另外一个开发案。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 17-10-2025 03:03 PM , Processed in 0.158264 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表