I am trying to evaluate a ganatt chart control by ActiveSchedule. I have modified the sample code to read data from my database, but am sure I'm missing something here. In the code below, I read data from table to get the rooms to display (each room is a row). With the query I should get 8 rows. As I have the code, it only displays one. If I remove the GetType().ToString() from the RoomID, I get nothing. The function expects a string here, and the value in the query is a int. So I don't know if that is the problem, or if I'm just not actually looping through the records:
oSQL = New System.Data.OleDb.OleDbCommand("SELECT * FROM coRooms where deptid=23", mp_oCon)
ActiveGanttVBACtl1.RowHeadings.Add("Rooms")
oSQL.CommandText = "SELECT * FROM coRooms where deptID=23 and isactive=1 order by DeptDisplayOrder"
Rows = oSQL.ExecuteReader
Do While Rows.Read
ActiveGanttVBACtl1.Rows.Add(Rows.Item("RoomID").GetType().ToString, Rows.Item("RoomName"), True, , "", "")
Loop
Rows.Close()
Thanks for any pointers.