标题: 手把手教你使用VB来创建ASP组件(5) 
羽毛の昕
中校
Rank: 1



UID 64431
精华 3
积分 1550
帖子 730
威望 14
金币 760
热心 0
阅读权限 50
注册 2007-6-17
状态 离线
手把手教你使用VB来创建ASP组件(5) 

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

顶部
[广告] 免费域名(Free Subdomain) 免费空间(Free hosting) PR查询(Google Pagerank)



当前时区 GMT+8, 现在时间是 2008-9-8 17:08
信产部ICP备案:京ICP备05066424号 北京市公安局网监备案:1101050648号

Powered by Discuz! 5.5.0
清除 Cookies - 联系我们 - 网友俱乐部 - Archiver - WAP