GetDataTableAsync

English version ›› Plugins ›› HatPluginMySql ›› Class: TesterMySql ›› Methods ››
Parent Previous Next

GetDataTableAsync

Description: the method returns a table of records from the database table after executing the query

Syntax: GetDataTableAsync(string sqlQuertSelect)

Return value: DataTable


Example:

DataTable dataTable = null;

dataTable = await testerMySql.GetDataTableAsync("SELECT * FROM test_table");


foreach (DataRow row in dataTable.Rows)

                    foreach (DataColumn col in dataTable.Columns)

                            tester.ConsoleMsg(row[col].ToString());

Created with the Personal Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source