|
-
Nov 7th, 2000, 03:42 AM
#1
Thread Starter
Lively Member
i m trying to use withevents keyword on my recordset but i do not get to any event and i dont know why
any help will be appreciated
10x
-
Nov 7th, 2000, 04:05 AM
#2
Fanatic Member
From MSDN:
Code:
Dim WithEvent connEvent as Connection
Dim conn as New Connection
set connEvent = conn 'Turn on event support.
conn.Open(...)
...
set connEvent = Nothing 'Turn off event support.
...
Private Sub connEvent_ConnectComplete(ByVal err as ADODB.Error, adStatus as ADODB.EventStatus, ByVal pConnectionas ADODB.Connection)
'Check the error object only if adStatus equals adStatusErrorsOccurred.
...
End Sub
I know its for a connection, but the same principle should apply for a recordset
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Nov 7th, 2000, 04:12 AM
#3
Fanatic Member
Here you go:
Code:
Dim WithEvents Rs As Recordset
Dim RecS As New Recordset
Private Sub Form_Load()
Set RecS = Rs
End Sub
Private Sub Rs_FetchComplete(ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
End Sub
Private Sub Rs_FetchProgress(ByVal Progress As Long, ByVal MaxProgress As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
End Sub
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Nov 7th, 2000, 06:26 AM
#4
Thread Starter
Lively Member
first of all 10x but the same thing that you wrote
for the recordset i tried and didnt succeed
if you try it you will find out that it doesnt work
with the recordset althogh it works on the connection
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|