MDAC 2.5 SDK - OLE DB Testing


 

Using the TableDump Utility with Local Test Manager

TableDump is a simple command-line utility that takes arguments for all its required information. The utility also can be used with Local Test Manager (LTM). When creating a provider alias, specify FILE=filename.ini in the LTM initialization string. When the test runs, it checks for the existence of this keyword and processes the .ini file before beginning any test variations.

Note   Arguments must be followed by an equal sign (=) and end in a semicolon (;) to distinguish them from other arguments. Arguments containing a semicolon or equal sign can be enclosed in single quotes, as in the following example:

ProviderString='Data Source=Pubs;User ID=SA;Password=;'

The following table lists the required and optional keywords, values, and descriptions for the TableDump utility.

Keyword/Value Description
PROVIDER=ProviderName; Required葉he Provider ProgID of the provider to use. TableDump will use ProgIDToCLSID to convert this to a CLSID to obtain an instance of the provider in CoCreateInstance.
TABLENAME=TableName; Required葉he TableName to pass to IOpenRowset.

Note   Although the argument is called TableName, this does not imply that TableDump works only with relational providers. Here, TableName just indicates the DBID passed to IOpenRowset.

DEFAULTQUERY=DefaultQuery;  Optional蓉sually not needed. If you want to test command support, this is the default command for all queries used by the tests and PrivLib. All entries in the QUERY section will have this command as the default. You can then modify that section based on your provider's required grammar or command syntax.
OUTPUT=OutputFileName;  Optional葉he output file name for the generated .ini file. You can include the entire path, including file name and extension. TableDump will default to "TableDump.out" if this option is not specified.
CREATETABLE=<number of rows in table>; Optional葉he number of rows in the table you are creating. For providers that support table creation and ANSI SQL. After creation, you can populate the table on every test run with data of your choosing.
CREATEINDEX=<column ordinal for the index>; Optional葉he column ordinal for the index in the table you have created. For providers that support table creation and ANSI SQL.