Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reader Question - Loading Data
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Reader Question - Loading Data
Divers
Thread ID:
00802965
Message ID:
00802965
Vues:
42
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform