PRB: IRowsetNotify Error with ADO Data Control and ADO RecordsetID: Q195638
|
When manipulating methods of the ADO Data Control's Recordset property through code, or when manipulating an ADO Recordset object that has controls bound to it, you receive the following error message:
Run-time error '-2147217888 (80040e20)':
Provider called a method from IRowsetNotify in the consumer and the
method has not yet returned.
Microsoft is currently investigating the cause of this bug.
ADODC1.Recordset.Move 0
Resolution number 2 is the workaround discussed in the MORE INFORMATION
section below..
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
The ADO data control and the ADO Recordset object sometimes do not respond
correctly to IRowsetNotify events raised by the data provider. There are
currently three known methods to generate this error. The workaround
described above works in each of these cases. It should also be tried in
any unconfirmed cases.
Notes:
Microsoft ADO Data Control 6.0 (OLEDB)
Microsoft DataList Controls 6.0 (OLEDB)
ADO Data Control
Name = ADODC1
CursorLocation = adUseServer
CursorType = adOpenKeyset
LockType = adLockOptimistic
ConnectString = Provider=Microsoft.Jet.OLEDB.3.51;
Data Source=nwind.mdb
RecordSource = Orders
ADO Data Control
Name = ADODC2
CursorLocation = adUseServer
CursorType = adOpenKeyset
LockType = adLockOptimistic
ConnectString = Provider=Microsoft.Jet.OLEDB.3.51;
Data Source=nwind.mdb
RecordSource = Customers
ADO Data Combo
Name = DataCombo1
DataSource = ADODC1
DataField = CustomerID
RowSource = ADODC2
ListField = CompanyName
BoundColumn = CustomerID
Command Button
Name = cmdAddNew
Caption = Add New
Command Button
Name = cmdUpdate
Caption = Update
Private Sub cmdAddNew_Click()
ADODC1.Recordset.AddNew
End Sub
Private Sub cmdUpdate_Click()
' ADODC1.Recordset.Move 0
ADODC1.Recordset.Update
End Sub
Microsoft ADO Data Control 6.0 (OLEDB)
Private Sub MDIForm_Load()
Form1.Show
End Sub
Private Sub cmdBadUpdate_Click()
' MDIForm1.ActiveForm.ADODC1.Recordset.Move 0
MDIForm1.ActiveForm.ADODC1.Recordset.Update
End Sub
ADO Data Control
Name = ADODC1
CursorLocation = adUseServer
CursorType = adOpenKeyset
LockType = adLockOptimistic
ConnectString = Provider=Microsoft.Jet.OLEDB.3.51;
Data Source=nwind.mdb
RecordSource = Orders
Text Box
Name = Text1
DataSource = ADODC1
DataField = CustomerID
Text Box
Name = Text2
DataSource = ADODC1
DataField = OrderDate
Text Box
Name = Text3
DataSource = ADODC1
DataField = ShippedDate
Command Button
Name = cmdUpdate
Caption = Update
Private Sub cmdUpdate_Click()
ADODC1.Recordset.Update
End Sub
Additional query words:
Keywords : kbADO200 kbDatabase kbDataBinding kbVBp600
Version : WINDOWS:2.0,6.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 12, 1999