PRB: MSFlexGrid Does Not Return All Rows with UseODBC Data ControlID: Q171952
|
The MSFlexGrid control does not return all rows when bound to a Data control whose DefaultType is UseODBC.
All of the following are possible workarounds:
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
The DefaultType property of the Data control is new to Visual Basic 5.0.
It determines what type of data source (Jet or ODBCDirect) to use when
creating a Recordset.
'Replace MY_SERVER with an appropriate SQL pubs database DSN.
Data1.Connect = "ODBC;DSN=MY_SERVER;UID=SA;PWD="
Data1.RecordSource = "SELECT * FROM TITLES"
Data1.Refresh
'Number of rows in the Recordset.
MsgBox Data1.Recordset.RecordCount
'Number of rows in MSFlexGrid1 excluding the title row.
MsgBox MSFlexGrid1.Rows - 1
Additional query words: kbVBp500 kbVBp kbWinOS98 kbDSupport kbdse kbNoKeyWord
Keywords : kbVBp500 VBKBAX VBKBComp VBKBCtrl VBKBDB VBKBInt VBKBStd
Version : 5.0
Platform : NT WINDOWS
Issue type : kbprb
Last Reviewed: June 11, 1999