|
|
|
|
|
||||||
|
CLASS: |
|
|
|||||||
|
ADODatabase |
|
|
|||||||
|
|
|
||||||||
|
DESCRIPTION: |
|
|
|||||||
|
Represents an open connection to a data source. |
|
||||||||
|
|
|
||||||||
|
SYNTAX: |
|
|
|||||||
|
[<oRef> =] new ADODatabase() |
|
|
|||||||
|
|
|
||||||||
|
|
|
||||||||
|
PROPERTY: |
DEFAULT: |
DESCRIPTION: |
|
||||||
|
baseClassName |
ADODATABASE |
Identifies the object as an instance of the ADODatabase class |
|
||||||
|
className |
ADODATABASE |
Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName |
|
||||||
|
Empty string |
The name of custom object |
|
|||||||
|
parent |
null |
Container form or report |
|
||||||
|
false |
Whether the object is open and active or closed. |
|
|||||||
|
catalog |
Object |
A reference to the ADOXCatalog object that contains the catalog of database objects. (ADO Catalogs and ADOX objects are not currently implemented in dBASE Components) |
|
||||||
|
catalogName |
Empty string |
Current database catalog name. |
|
||||||
|
Object |
A reference to an array that contains the ADOCommand objects. |
|
|||||||
|
30 |
In seconds, how long to wait while executing a command before terminating the command and issuing and error. |
|
|||||||
|
Empty string |
Connection statement that describes parameters used to establish a connection with data source. |
|
|||||||
|
15 |
In seconds, how long to wait while establishing a connection before terminating the attempt and issuing and error. |
|
|||||||
|
0 - Unspecified |
Available options that can be used to open a connection to a data source. |
|
|||||||
|
0 - Client |
Location of the cursor service. |
|
|||||||
|
Empty string |
Database alias name. |
|
|||||||
|
Object |
A reference to an array that contains the ADOError objects. |
|
|||||||
|
0 - Unspecified |
Available options that can be used to execute command. |
|
|||||||
|
0 |
ADO statement handle. |
|
|||||||
|
1 - Read Committed |
Determines the isolation level of a transaction. |
|
|||||||
|
2 - Complete |
Whether a login dialog appears immediately before opening a connection to data source. |
|
|||||||
|
Empty string |
User name and password used to login to a data source. |
|
|||||||
|
0 - Unknown |
Available permissions for modifying data. |
|
|||||||
|
AssocArray |
A reference to Associative array that contains the dynamic properties. |
|
|||||||
|
MSDASQL |
Database Provider short name. |
|
|||||||
|
Empty string |
Current database schema name. |
|
|||||||
|
1 - All |
How to share the database connection. |
|
|||||||
|
0 - Closed |
Enum that indicates the state object. |
|
|||||||
|
0 |
Current level of transaction. |
|
|||||||
|
0 - Unspecified |
Available options that can be used to the transaction operations. |
|
|||||||
|
Empty string |
ADO engine version number. |
|
|||||||
|
|
|
||||||||
|
EVENT: |
PARAMETERS: |
DESCRIPTION: |
|
||||||
|
|
Event fired when there’s an attempt to deactivate a database; return value determines if the object is deactivated. |
|
|||||||
|
|
Event fired when attempting to open a database; return value determines if object is opened. |
|
|||||||
|
<state expN> |
Event fired when attempting to call transaction method; return value determines if the state of transaction is changed. |
|
|||||||
|
|
Event fired after a database is successfully closed. |
|
|||||||
|
<cmd expC><result expL> |
Event fired after a current command is successfully executed or execute is failed. |
|
|||||||
|
|
Event fired after a database is successfully opened. |
|
|||||||
|
<percent expN>,<type expN>,<status expN>,<msg expC> |
Event fired periodically during long-running data processing operations. |
|
|||||||
|
<state expN> |
Event fired after the transaction method is successfully called. |
|
|||||||
|
|
|
|
|||||||
|
|
|
|
|||||||
|
METHOD: |
PARAMETERS: |
DESCRIPTION: |
|
||||||
|
|
Opens a database connection. |
|
|||||||
|
|
Closes a database connection. |
|
|||||||
|
|
Cancels execution of a pending, asynchronous method call. |
|
|||||||
|
<cmd expC>[,<rowret expL>] |
Executes the specified SQL statement. |
|
|||||||
|
<schema expC>[,<criteria expC>][,<criteria expA>] |
Returns information about a database. |
|
|||||||
|
|
Begins transaction and starts logging changes. |
|
|||||||
|
|
Cancels the transaction by undoing all logged changes. |
|
|||||||
|
|
Commits changes made during transaction; ends transaction |
|
|||||||
|
[<string expC>] |
Creates a new catalog for a new database. |
|
|||||||
|
|
|
|
|||||||
|
|
|
|
|||||||
|
DESCRIPTION: |
|
||||||||
|
This class object represents a unique session with a data source. In the case of a client/server database system, it may be equivalent to an actual network connection to the server. |
|
||||||||
|
Through this connection, you can access and manipulate a database. |
|
||||||||
|
If you want to access a database multiple times, you should establish a connection using this object class. |
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
EXAMPLES: |
|
||||||||
|
|
|
||||||||
|
Execute SQL commands. How do I execute sql commands in ADODatabase object? You would use the syntax for the particular DBMS and Driver you are connecting to. You can usually find the proper syntax by doing a Google search or looking up the driver info. Here is an example of using the executeSQL command on an ADODatabase object with a MySQL connection using the 5.x MySQL driver.
this.ADODATABASE1 = new ADODATABASE(this) with (this.ADODATABASE1) onOpen = class::ADODATABASE1_ONOPEN onExecute = class::ADODATABASE1_ONEXECUTE left = 6.1111 top = 4.08 databaseName = "MYSQLTEST_CA" active = true endwith
function ADODATABASE1_onExecute(cmd) ?"Completed "+cmd return true
function ADODATABASE1_onOpen ?"about to : CREATE TABLE aLongVarChar (ALongText LongText);" this.executeSQL("CREATE TABLE aLongVarChar (ALongText LongText);") return
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|
||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|||||||||
|
|
|
|
|
||||||