Scalabium Software

SMReport Autogenerated
Knowledge for your independence'.
Home Delphi and C++Builder tips


#62: How can I get the alias list, tables list etc?

If you need show in your application the available alias list or available table list for some alias, you must use the Session variable.

This variable have a lot of useful methods.

For example, if you have the cbAliasNames component (combobox for alias names), then call:

Session.GetAliasNames(cbAliasnames.Items)

and the items of this combobox will contain the available BDE aliases.

Second example: if you have the cbTablesNames component (combobox for tables names for some alias), then call:

Session.GetTableNames(strAliasName, cbAliasnames.Items, '', true, False, cbTablesNames)

and the items of this combobox will contain the available table list for strAliasName alias. In the second parameter you can specify the wildcard symbols. Also you can retrieve the data tables only or data and system tables (view fourth parameter).

The GetAliasParams method allows to retrieve the parameters associated with wished BDE alias. For example, if you want to read the default user name and database folder parameters, you must use the next code:

Session.GetAliasParams(strAliasName, cbAliasParams.Items);
edUserName.Text := cbAliasParams.Items.Values['USER NAME'];
edDirectory.Text := cbAliasParams.Items.Values['PATH'];

Also you can retrieve a list of the stored procedures for some database (view the GetStoredProcNames method of Session variable).

If you need retrieve a list of available BDE drivers only, you must call the GetDriverNames method. To retrieve the parameters of some driver, you must call the GetDriverParams methods.

The GetIndexNames method of the TTable component allows to retrieve a list of all available indexes for a table:

tbl.GetIndexNames(cbIndexNames.Items)


Published: January 25, 2000

See also
 
Viewer for TNEF-files (winmail.dat)
DBISAM Viewer
Paradox to MS Access converter
Paradox Viewer
DBISAM Password Recovery
Clarion Viewer
Paradox Password Recovery
SMExport suite
Clarion to Text converter
ABA Document Convert
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2024, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport/SMImport suites