New topic: Populate combobox from DB
<http://forums.realsoftware.com/viewtopic.php?t=46119> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message horses60 Post subject: Populate combobox from DBPosted: Sun Dec 02, 2012 1:03 pm Joined: Sat Nov 17, 2012 5:58 pm Posts: 7 Location: Quebec City (Canada) I try to populate a combobox from a table, but my code is not correct. The database exists, I can see the records, but when I try the program âdb.connectâ itâs false. Where is the problem? Thanks. Dim wSQL as String Dim rs As RecordSet Dim db As New REALSQLDatabase Dim dbFile As FolderItem dbFile = GetFolderItem("IT.rsd") db.DatabaseFile = dbFile ' Test to make sure I am connected to the database. If db.Connect() = True Then wSql = "SELECT idProjet, txtProjet" _ + " FROM tblProjets" _ + " WHERE indActif = 1" rs = db.SQLSelect(wSql) while not rs.eof cboProjet.AddRow rs.Field("txtProjet").stringValue rs.moveNext wend rs.Close End If Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
