Professional Documents
Culture Documents
SQL
The SQL library allows you to create and manage SQL databases.
See the SQL tutorial for more information.
List of types:
Cursor
SQL
Cursor
Events:
None
Members:
Close
IsInitialized As Boolean
Position As Int
Members description:
Close
Closes the cursor and frees resources.
IsInitialized As Boolean
SQL
Events:
None
Members:
BeginTransaction
Close
EndTransaction
TransactionSuccessful
Members description:
BeginTransaction
Begins a transaction. A transaction is a set of multiple "writing" statements that are
atomically committed,
hence all changes will be made or no changes will be made.
As a side effect those statements will be executed significantly faster (in the default case
a transaction is implicitly created for
each statement).
It is very important to handle transaction carefully and close them.
The transaction is considered successful only if TransactionSuccessful is called.
Otherwise no changes will be made.
Typical usage:
SQL1.BeginTransaction
Try
'block of statements like:
For i = 1 to 1000
SQL1.ExecNonQuery("INSERT INTO table1 VALUES(...)
Next
SQL1.TransactionSuccessful
Catch
Log(LastException.Message) 'no changes will be made
End Try
SQL1.EndTransaction
Close
Closes the database.
Does not do anything if the database is not opened or was closed before.
EndTransaction
Ends the transaction.
IsInitialized As Boolean
Tests whether the database is initialized and opened.
TransactionSuccessful
Marks the transaction as a successful transaction. No further statements should be
executed till calling EndTransaction.
Top