public static List <string> database_Names(this API_VistaDB vistaDB) { var sqlQuery = "select * from [database schema] where typeid = 1"; return((from DataRow row in vistaDB.executeReader(sqlQuery).Rows select row["name"].str()).toList()); }
public static API_VistaDB map_Table_Data(this API_VistaDB vistaDB, Table table) { // var sqlQuery = "select * from [{0}].[{1}].[{2}]".format(table.Catalog,table.Schema, table.Name); var sqlQuery = "select * from {0}".format(table.Name); table.TableData = vistaDB.executeReader(sqlQuery); return(vistaDB); }
public static API_VistaDB add_Viewer_QueryResult <T>(this API_VistaDB vistaDB, T control, string sqlQuery) where T : Control { control.clear(); var dataTable = vistaDB.executeReader(sqlQuery); var dataGridView = control.add_DataGridView(); dataGridView.DataError += (sender, e) => { // " dataGridView error: {0}".error(e.Context); }; dataGridView.invokeOnThread(() => dataGridView.DataSource = dataTable); return(vistaDB); }