ExecuteTable
Previous Top Next

Executes the command and fills the table control with the result.
Syntax: ExecuteTable (Table As DataGrid, Maximum As Int32)
Table - The name of the table control. The contents of the table will be cleared before the operation.
Maximum - Maximum number of rows to return. Setting this value to 0 will return all the rows available.

Example: (taken from the SQL example)
'Executes the SQL command
Sub mnuExecute_Click
      cmd.CommandText = txtCommand.Text
      'Executes the user query and fills the table with the result.
      cmd.ExecuteTable("table1",500) 'Limits the number of rows to 500 (change to 0 for unlimited)
End Sub