Constructor
new DatabaseSync(connectionString)
- Description:
Opens a connection to the database with the given connection-string. The
connectionString
must be either the virtual file-system path of an SQLite or SQL Server Compact file, or a prefixed database connection-string. The prefixes are shown below:Connection-type Prefix File-extension Database DLLs required? SQLite sqlite:* .sqlite3 no SQL Server Compact sqlserverce:* .sdf no SQL Server sqlserver: n/a no ODBC odbc: n/a no OLE DB oledb: n/a yes** * - Prefixes are only required for SQLite and SQL Server Compact if the listed file-extension isn't being used.
** - For OLE DB connections the DLLs for the specific database being accessed must be placed in the same directory as the CompleteFTP server executables.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
connectionString |
String |
Members
lastRowIdQuery :String
- Description:
SQL statement used to obtain the ID of the most recently inserted row.
- Source:
SQL statement used to obtain the ID of the most recently inserted row.
Type:
- String
Methods
changeVersion()
- Description:
Not implemented.
- Source:
readTransaction(callbackopt)
- Description:
Run the read transaction contained in the given callback function. A SQLTransactionSync object is passed as an argument to the callback. This may be used execute queries. The transaction is committed if the callback returns normally and rolled back if it throws an exception.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function |
<optional> |
callback function Properties
|
transaction(callbackopt)
- Description:
Run the non-read transaction contained in the given callback function. A SQLTransactionSync object is passed as an argument to the callback. This may be used execute queries. The transaction is committed if the callback returns normally and rolled back if it throws an exception.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function |
<optional> |
callback function Properties
|