手把手教你使用VB来创建ASP组件(5)
ReadyGo!技术成就梦想
网络搜索
efish
2008-2-24 3:07:31
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
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
-
相关文章
手把手教你使用VB来创建ASP组件(6)
手把手教你使用VB来创建ASP组件(6)
手把手教你使用VB来创建ASP组件(7)
手把手教你使用VB来创建ASP组件(7)
手把手教你使用Java来编写ASP组件(2)
手把手教你使用Java来编写ASP组件(2)
手把手教你使用Java来编写ASP组件(4)
手把手教你使用Java来编写ASP组件(4)
手把手教你使用Java来编写ASP组件(5)
手把手教你使用Java来编写ASP组件(5)
手把手教你使用Java来编写ASP组件(6)
手把手教你使用Java来编写ASP组件(6)
ASP中时间函数的使用(一)
ASP中时间函数的使用(一)
ASP中时间函数的使用(二)
ASP中时间函数的使用(二)
ASP中时间函数的使用(三)
ASP中时间函数的使用(三)
.NET之ASP WebApplication快速入门(1)
.NET之ASP WebApplication快速入门(1)
2秒记住本站域名
玩过泡泡龙吗?Readygo?Go! 再加上.Com.Cn的后缀,那就是大名小顶的ReadyGo.com.cn
