MOD2000: Only One Record Returned When You Change Data Control SQL Statement (230451)
The information in this article applies to:
- Microsoft Office 2000 Developer
This article was previously published under Q230451 Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
After you change the CommandText property of a Microsoft ADO data control, the control returns only one record, regardless of how many records the modified SQL statement should return.
RESOLUTION
In your Visual Basic for Applications code, refresh the data control before you bind additional controls to it, for example:
'In this example the control Adodc1 is refreshed before data source
'for the data grid is set.
Private Sub CommandButton1_Click()
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCES
For more information about the ADO data control, start the MSDN Library for Microsoft Office 2000 Developer, type ADO Data Control on the Index tab, and press ENTER to view "ADO Data Control in Office 2000 Applications."
Modification Type: | Major | Last Reviewed: | 8/12/1999 |
---|
Keywords: | kbbug KB230451 |
---|
|