New topic: List tables in combobox
<http://forums.realsoftware.com/viewtopic.php?t=46628> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message f_hendriksen Post subject: List tables in comboboxPosted: Sun Jan 20, 2013 1:47 pm Joined: Fri Sep 18, 2009 8:09 am Posts: 81 Location: Netherlands This is what I want to do: - open a database - list the tables of the database in a combobox. This is what I have so far. Dim db As REALSQLdatabase Dim TargetFile As FolderItem Dim blnResult As Boolean db = New REALSQLdatabase TargetFile = GetOpenFolderItem("") db.DatabaseFile = TargetFile blnResult = db.Connect() If blnResult = True Then db.Close Else MsgBox "Database Error: " + db.ErrorMessage End If Dim tables As RecordSet tables = db.TableSchema dim ComboBox1 as combobox If tables <> Nil Then While Not tables.EOF if tables.IdxField(1).StringValue <> "" then combobox1.AddRow(tables.IdxField(1).StringValue) end if tables.MoveNext Wend tables.Close End If The only problem is that it doesn't work, the combobox stays empty. What can i do to make it work? 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 rbforumnotifier@monkeybreadsoftware.de