---------------------------------------------------------------------------
| 146 | } |
| 147 | //--------------------------------------------------------------------------- |
| 148 | bool __fastcall TForm1::get_tables(String db_name) |
| 149 | { |
| 150 | MYSQL_RES *res; |
| 151 | AnsiString s_cmd; |
| 152 | |
| 153 | TableView->Items->Clear(); |
| 154 | s_cmd = "use "; |
| 155 | s_cmd+= db_name.c_str(); |
| 156 | |
| 157 | if (mysql_query(MySQL, s_cmd.c_str()) || |
| 158 | !(res=mysql_list_tables(MySQL,"%"))) |
| 159 | return false; |
| 160 | |
| 161 | tables_node = TableView->Items->Add(NULL, db_name.c_str()); |
| 162 | tables_node->ImageIndex = 1; |
| 163 | tables_node->SelectedIndex = 1; |
| 164 | |
| 165 | deque<string> rows = fill_rows(res); |
| 166 | |
| 167 | mysql_free_result(res); |
| 168 | fill_tree(rows,tables_tree,tables_node,TableView,2); |
| 169 | |
| 170 | return true; |
| 171 | } |
| 172 | //--------------------------------------------------------------------------- |
| 173 | bool __fastcall TForm1::get_dbs(void) |
| 174 | { |
nothing calls this directly
no test coverage detected