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

ASP
ASP 中 Split 函数的实例
存贮过程
asp内置对象 ObjectContext详解
如何写出优秀的ASP应用
用ASP制作强大的搜索引擎
ASP 系列函数大全
彩色校验码的制作
ASP中使用SQL语句教程
ASP提速技巧五则
ASP进度条
在电子商务中实现购物车的方法
ASP读取系统时区的错误行为修正
Rs.open sql,conn,A,B 的A、B各代表什么?
FSO组件操作实例技巧
用asp连接各种数据库的方法
WEB打印设置解决方案一
WEB打印设置解决方案二
WEB打印设置解决方案三
实例分析CSS属性Display与Visibility不同
每页都有的表头和打印分页

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 223 ::
收藏到网摘: 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