Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reader Question - Loading Data
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Reader Question - Loading Data
Miscellaneous
Thread ID:
00802965
Message ID:
00802965
Views:
40
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")

        ' Get the Room to load into the Gantt Control

        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.
Next
Reply
Map
View

Click here to load this message in the networking platform