当前位置: 首页 > 图文教程 > 网络编程 > ASP > 手把手教你使用VB来创建ASP组件(5)

ASP
ASP编程中15个非常有用的例子 (二)
ASP与JSP的比较(一)
ASP与JSP的比较(二)
ASP中五种连接数据库的方法
从ASP调用SQL中的图像
用排序串字段实现树状结构(例程:连接字串)
用排序串字段实现树状结构(例程:删除贴子)
用排序串字段实现树状结构(例程:回复表单)
用排序串字段实现树状结构(例程:显示贴子内容)
用排序串字段实现树状结构(例程:显示树)
用排序串字段实现树状结构(存储过程)
用排序串字段实现树状结构(库结构)
用排序串字段实现树状结构(原理)
remote script文档(转载自微软)(一)
remote script文档(转载自微软)(二)
remote script文档(转载自微软)(三)
remote script文档(转载自微软)(四)
remote script文档(转载自微软)(五)
remote script文档(转载自微软)(六)
remote script文档(转载自微软)(七)

手把手教你使用VB来创建ASP组件(5)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 197 ::
收藏到网摘: n/a

  5、 IsEof方法

  IsEof方法是用来判断是否还有更多的信息

其代码如下

Private Function IsEof() As Boolean

IsEof = RecordSetCD.EOF

End Function

6、 NextCD 方法

  NextCD方法的目的是返回当前的CD信息,并将记录集的指针向下移动,这可以通过MoveNext方法和IsEof配合使用来实现

Private Sub NextCD(Id As Variant, Name As Variant, Author As Variant, Price As Variant, Information As Variant)

On Error Resume Next

If IsEof = True Then

Err.Raise vbObject + 1, "CD Information", "End of cursor"

Exit Sub

End If

Id = RecordSetCD.Fields("CD_ID")

Name = RecordSetCD.Fields("CD_Name")

Author = RecordSetCD.Fields("CD_Author")

Price = RecordSetCD.Fields("CD_Price")

Information = RecordSetCD.Fields("CD_Information")

RecordSetCD.MoveNext

End Sub

  好,我们已经编写好了组件,把它们编译成CD.dll后,你最好把他们注册一下 方法是在DOS界面下,输入regsvr32 CD.dll