Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Database - page of object PmDatabase

Description:
Parameters settings for the work with the database table.
Configuration items:
Technologytype of the SW support for an access to database files:
Direct access to table - DAO - suitable for accessing database files (Access, dBASE, Paradox, Excel, ...).
Access through ODBC - suitable for accessing the server databases - MS SQL, Oracle, MySQL, Sybase, Informix, ...? (the FindFirst, FindLast, FindPrev, FindNext, Create, CreateEnd, CreateField, CreateIndex methods are not functional).
Database type Type of the database table according the required format of the particular database. By the selection it is possible to define one of the supported database types.

This configurator sets the initial value of the property Type.

Database (file, folder, data source)If the database contains only one table (one-table database, e.g. dBase, PARADOX), the configurator serves for the path definition to the folder of files. If it contains more tables (e.g. Btrieve, Microsoft Access, Excel), the configurator serves for the file name (possible with the path). File names have to be entered without the extension. The extra button can list database files.

This configurator sets the initial value of the property Database.

Table (file)If the database contains only one table (one-table database, e.g. dBase, PARADOX), the configurator serves for the definition of the path and name of the database file without the extension. If it contains more tables (e.g. Btrieve, Microsoft Access, Excel), the configurator serves for the table name from the database file.

This configurator sets the initial value of the property Table.

UserUser name (only at the user access oriented databases)
PasswordUser password (only at the user access oriented databases).

This configurator sets the initial value of the property Password.

Database logon timeout [sec]Maximum time that the PmDatabase object is waiting for the connection to the database on the server. If the database connection fails, the attempt ends with an error - Connect and Open functions returns false and an error is written into the INFO system. See method SetParam.
Read onlyIf checked, the database table will serve only for reading, no writing into it is possible on running the application.
Exclusive accessIf checked, then only one user will have an access to the database table. Another user (another PmDatabase object or application) can work with the database table after the previous user completes its work.
Open using the SQL statement SELECTIf checked, a command defined by the "SQL statement" configurator in the SQL language syntax will be executed on opening the table.
SQL statementStatement of the SELECT type in the MS SQL Server language syntax. Referred table needn't be equal to the table defined by the "Table (file)" configurator. The extra button can select the command.

This configurator sets the initial value of the property OpenSQL.

Table open modeOpen mode for the database table:
Dynamic query (dynaset) - The user (the PmDatabase object) can read the table (by the FieldValues property), scroll in both directions (by the Move, FindFirst, etc. methods), write into it (by the FieldValues property). Changes made by another user (by another PmDatabase object, another application) in existing table rows (at the moment of opening) are visible even after opening the table. Adding and removing rows by another user aren't visible. Supported by the most ODBC drivers (if the "Database type as ODBC" configurator is selected), the opening time can be relatively longer than the forwardOnly, snapshot options.
Static query (snapshot) - The user (the PmDatabase object) can read the table (by the FieldValues property), scroll in both directions (by the Move, FindFirst, etc. methods), he can't write into it. Changes made by another user (by another PmDatabase object, another application) in existing table rows (at the moment of opening) are not visible. Adding and removing rows by another user aren't visible. Supported by the most ODBC drivers (if the "Database type as ODBC" configurator is selected), the opening time can be relatively less than the dynaset, table options.
Static non-reversible query (forwardOnly) - The user (the PmDatabase object) can read the table (by the FieldValues property), scroll only in one direction (forward) (by the MoveNext method), he can't write into it. Any changes (in existing rows, adding and removing a row) made by another user (by another PmDatabase object, another application) after the moment of opening are not visible. Supported by the most ODBC drivers (if the "Database type as ODBC" configurator is selected), the opening time can be relatively less than the dynaset, table options.
Table query (table) - The user (the PmDatabase object) can read the table (by the FieldValues property), scroll in both directions (by the Move, FindFirst, etc. methods), he can write into it (by the FieldValues property). Changes made by another user (by another PmDatabase object, another application) in existing table rows (at the moment of opening) are visible. Adding and removing rows by another user are visible. Not supported by the most ODBC drivers (if the "Database type as ODBC" configurator is selected), the opening time can be relatively longer than the forwardOnly, snapshot options.
Open with SQLPassThroughIf checked, the SQL statement SELECT is passed without the syntax correction of the PmDatabase object.
Direct openopen mode of the PmDatabase object.
On startdatabase connection and table open mode.
Don't connect the database and don't open the table - on start of the application the database won't be connected and the database table won't be opened.
Connect database and open table (the same as "Open" method) - on start of the application the database will be connected and the database table will be opened as well. See method Open.
Connect database and do NOT open table (the same as "Connect" method) - on start of the application the database will be connected but the database table won't be opened. See method Connect.
Note:

Database connection stands for the operation when the application is connected to the database. By this operation an image of the table data (possible the SQL query) isn't created in the storage area of the application.

Opening the table means the operation when a set of rows corresponding to the table (possible to the SQL query) is created in the storage area of the application.

© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice