Populate Datagrid control
-
Hi, Im having trouble populating my datagrid control from an ms access database. 1st method I used was through ADODC control and it worked fine. Then I just found a way to lessen the code by creating a class then passing variables through a module. Anyways using the class method my datagrid does not show any data at all. I've removed the datasource control and debugged the program...record count shows that it did get something. Im just in the dark why it won't populate in my datagrid. By the way I'm using vb6 and datagrid through common control 6.0. populate datagrid
clsPubConnection.GetQuery rs1, "insert query here", 1, 1
Set dgd1.DataSource = rs1
dgd1.Refreshcode inside the class
If rs.State = 1 Then rs.Close
With rs
.CursorType = intCursorType
.LockType = intLockType
.ActiveConnection = cn
.Source = strSqlCommand
.Open
End WithAny help would be greatly appreciated. Thanks in advance :-D
Aim small, miss small