Actually the datagrid control that I normally use is SSDBGrid and not DataGridView. SSDBGrid is one of few controls from Sheridan. I am coding in VB6 by the way. Normally with SSDBGrid this is how I would do
Code:
str = "SELECT * FROM tblStkGrpCd"
Rst.Open str, POConn, adOpenKeyset, adLockOptimistic
With SSDBCStkGrpCd
.RemoveAll
Do While Not Rst.EOF
.AddItem Trim(Rst.Fields(0)) & vbTab & Trim(Rst.Fields(1))
Rst.MoveNext
Loop
End With
Rst.Close
Set Rst = Nothing
How do I do this part in standard VB6 DataGrid?
Code:
Do While Not Rst.EOF
.AddItem Trim(Rst.Fields(0)) & vbTab & Trim(Rst.Fields(1))
Rst.MoveNext
Loop