Forum Discussion

Kateryna's avatar
Kateryna
Contributor
13 years ago

Get names of DBTables during test execution

Hello,     I wonder is it possible to get names of all table stored in DBTables by script? I need such script that during test execution saves all table names in current keyword test into a...
  • HKosova's avatar
    13 years ago
    Hi Kateryna,



    The DBTables[variable_name] and DBTables.variable_name constructs aren't valid in DelphiScript.



    Here's the correct code:

    var tbl;

    ...

    tbl := tbls.Item(i).Value;

    tbl.ConnectionString := ...


    Please note that the data source table name for a DBTable item can't be changed from scripts. So, the table name in the new data source must be the same as in the original data source.