MBS Xojo Developer Conference and Training
Join us from 11th to 14th September 2013 in Koblenz.
Join us from 11th to 14th September 2013 in Koblenz.
Platforms to show: All Mac Windows Linux Cross-Platform
SQLConnectionMBS.AutoCommit as integer
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Whether autocommit is enabled or disabled for the current connection.
Notes:
If autocommit is on, the database is committed automatically after each SQL command. Otherwise, transaction is committed only after Commit calling.
(Read and Write computed property)
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Whether autocommit is enabled or disabled for the current connection.
Notes:
If autocommit is on, the database is committed automatically after each SQL command. Otherwise, transaction is committed only after Commit calling.
(Read and Write computed property)
SQLConnectionMBS.Client as integer
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The current DBMS client assigned for the connection.
Notes: (Read and Write computed property)
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The current DBMS client assigned for the connection.
Notes: (Read and Write computed property)
SQLConnectionMBS.ClientVersion as integer
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the DBMS client API version number.
Notes:
The higher word contains the major client version (the XX value in the XX.YY version number); the lower word contains the minor client version (the YY value in the XX.YY version number).
If an DBMS client was not set calling ClientVersion method will throw an exception.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the DBMS client API version number.
Notes:
The higher word contains the major client version (the XX value in the XX.YY version number); the lower word contains the minor client version (the YY value in the XX.YY version number).
If an DBMS client was not set calling ClientVersion method will throw an exception.
SQLConnectionMBS.Commit
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Saves any changes and ends the current transaction.
Notes:
Use Commit method to write transaction changes permanently to a database. It commits the work of all commands that associated with that connection.
All changes to the database since the last commit are made permanent and cannot be undone. Before a commit, all changes made since the start of the transaction can be rolled back using Rollback method.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Saves any changes and ends the current transaction.
Notes:
Use Commit method to write transaction changes permanently to a database. It commits the work of all commands that associated with that connection.
All changes to the database since the last commit are made permanent and cannot be undone. Before a commit, all changes made since the start of the transaction can be rolled back using Rollback method.
SQLConnectionMBS.Connect(DBString as string, UserID as string, Password as string, client as integer = 0)
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Opens the connection to a data source.
Example:
Notes:
Using the Connect method on a SAConnection object establishes the physical connection to a data source. After this method successfully completes, the connection is live and you can issue commands against it and process the results.
If you use the default value of Client parameter, you should set Client before using Connect.
To check whether a connection established use isConnected method. To check whether a connection is brocken or not use isAlive method.
see also for server specific notes:
http://www.sqlapi.com/OnLineDoc/Connection_Connect.html
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Opens the connection to a data source.
Example:
dim con as SQLConnectionMBS// your connection
// some calls for MS SQL Server:
con.Connect("srv2@pubs","", "", SQLConnectionMBS.kSQLServerClient)
con.Connect("@pubs", "", "", SQLConnectionMBS.kSQLServerClient)
con.Connect("BEDLAM\SQL2005EX_EN@pubs", "", "", SQLConnectionMBS.kSQLServerClient)
con.Connect("BEDLAM\SQLEXPRESS@master", "", "", SQLConnectionMBS.kSQLServerClient)
// for MySQL:
con.Connect("192.168.1.80:3306@test","root","password", SQLConnectionMBS.kMySQLClient)
// for Postgre SQL:
con.Connect("somedb", "name", "password",SQLConnectionMBS.kPostgreSQLClient)
// for SQLite:
con.Connect("/test.db", "", "",SQLConnectionMBS.kSQLiteClient)
| DBString: | Name of database this connection will connect to (see Server specific notes). |
| UserID: | A string containing a user name to use when establishing the connection (see Server specific notes). |
| Password: | A string containing a password to use when establishing the connection. |
| client: | Optional. One of the following values from k*Client constants. |
Using the Connect method on a SAConnection object establishes the physical connection to a data source. After this method successfully completes, the connection is live and you can issue commands against it and process the results.
If you use the default value of Client parameter, you should set Client before using Connect.
To check whether a connection established use isConnected method. To check whether a connection is brocken or not use isAlive method.
see also for server specific notes:
http://www.sqlapi.com/OnLineDoc/Connection_Connect.html
SQLConnectionMBS.Disconnect
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Disconnects the connection from the database.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Disconnects the connection from the database.
SQLConnectionMBS.Error as Boolean
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Whether an error occurred.
Notes: This is for using RecordSet class with SQLConnectionMBS and SQLCommandMBS classes.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Whether an error occurred.
Notes: This is for using RecordSet class with SQLConnectionMBS and SQLCommandMBS classes.
SQLConnectionMBS.ErrorCode as Integer
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The last error code.
Notes: This is for using RecordSet class with SQLConnectionMBS and SQLCommandMBS classes.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The last error code.
Notes: This is for using RecordSet class with SQLConnectionMBS and SQLCommandMBS classes.
SQLConnectionMBS.ErrorMessage as string
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The last error message.
Notes: This is for using RecordSet class with SQLConnectionMBS and SQLCommandMBS classes.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The last error message.
Notes: This is for using RecordSet class with SQLConnectionMBS and SQLCommandMBS classes.
SQLConnectionMBS.isAlive as boolean
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the database server connection status for a particular connection object.
Notes:
Returns true if the database server is active and accessible; otherwise false.
This method uses the safe query execution for most supported DBMS-es. The query uses the well known database table or procedure (mysql_ping is used for MySQL). If the query fails the method returns false.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the database server connection status for a particular connection object.
Notes:
Returns true if the database server is active and accessible; otherwise false.
This method uses the safe query execution for most supported DBMS-es. The query uses the well known database table or procedure (mysql_ping is used for MySQL). If the query fails the method returns false.
SQLConnectionMBS.isConnected as boolean
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the connection state for a particular connection object.
Notes: Returns true if connected; otherwise false.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the connection state for a particular connection object.
Notes: Returns true if connected; otherwise false.
SQLConnectionMBS.IsolationLevel as integer
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The transaction isolation level.
Notes:
Use the kReadCommitted, kReadUncommitted, kRepeatableRead, kSerializable and kLevelUnknown constants.
(Read and Write computed property)
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: The transaction isolation level.
Notes:
Use the kReadCommitted, kReadUncommitted, kRepeatableRead, kSerializable and kLevelUnknown constants.
(Read and Write computed property)
SQLConnectionMBS.NativeAPI as variant
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.5, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns a set of functions of native DBMS client API.
Notes: Returns a SQLAPIMBS object.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.5, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns a set of functions of native DBMS client API.
Notes: Returns a SQLAPIMBS object.
SQLConnectionMBS.Option(name as string) as string
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A string value of a specific connection or command option.
Notes:
see also:
http://www.sqlapi.com/OnLineDoc/Connection_Option.html
(Read and Write computed property)
property, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A string value of a specific connection or command option.
Notes:
see also:
http://www.sqlapi.com/OnLineDoc/Connection_Option.html
(Read and Write computed property)
SQLConnectionMBS.Rollback
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Cancels any changes made during the current transaction and ends the transaction.
Notes:
Rollback method rolls back the database to the state it was in at the completion of the last commit operation. All uncommitted work is undone.
Rollback method rolls back the work of all commands that associated with that connection.
To commit all changes made since the start of the transaction use Commit method.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Cancels any changes made during the current transaction and ends the transaction.
Notes:
Rollback method rolls back the database to the state it was in at the completion of the last commit operation. All uncommitted work is undone.
Rollback method rolls back the work of all commands that associated with that connection.
To commit all changes made since the start of the transaction use Commit method.
SQLConnectionMBS.ServerVersion as integer
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the currently connected DBMS server version number.
Notes: The higher word contains the major server version (the XX value in the XX.YY version number); the lower word contains the minor server version (the YY value in the XX.YY version number).
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the currently connected DBMS server version number.
Notes: The higher word contains the major server version (the XX value in the XX.YY version number); the lower word contains the minor server version (the YY value in the XX.YY version number).
SQLConnectionMBS.ServerVersionString as string
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the currently connected DBMS server version string.
Notes: A server version string may contain some useful information about server brand, configuration and so on. It is a good idea to display this information in all your applications.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 9.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the currently connected DBMS server version string.
Notes: A server version string may contain some useful information about server brand, configuration and so on. It is a good idea to display this information in all your applications.
SQLConnectionMBS.SetFileOption(name as string, file as folderitem)
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.5, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Sets an option with passing a file path.
Example:
Notes:
Makes sure the path is correct and you have a 32bit library. 64 bit libraries will not work with Real Studio.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.5, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Sets an option with passing a file path.
Example:
dim db as new SQLConnectionMBS
// where is the library?
db.SetFileOption SQLConnectionMBS.kOptionLibraryMySQL, SpecialFolder.UserHome.Child("libmysqlclient.dylib")
SQLConnectionMBS.SQLExecute(command as string, CommandType as integer = 0)
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and ignores result.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and ignores result.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
SQLConnectionMBS.SQLExecuteMT(command as string, CommandType as integer = 0)
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.4, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and ignores result.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
The work is performed on an extra thread, so this function can yield time to other Real Studio threads. And it calles the Working event regularly. For best user experience run this command on a Real Studio thread, so your GUI stays responsive.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.4, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and ignores result.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
The work is performed on an extra thread, so this function can yield time to other Real Studio threads. And it calles the Working event regularly. For best user experience run this command on a Real Studio thread, so your GUI stays responsive.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
SQLConnectionMBS.SQLSelect(command as string, CommandType as integer = 0) as string
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the first field's string value.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
If the result is a record set, the first field from the first row is returned.
This is basicly useful for commands like "select sqlite_version()".
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the first field's string value.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
If the result is a record set, the first field from the first row is returned.
This is basicly useful for commands like "select sqlite_version()".
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
SQLConnectionMBS.SQLSelectAsRecordSet(command as string, CommandType as integer = 0) as RecordSet
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the result as RecordSet object.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
For this method to work, you need to have somewhere a property with SQLDatabaseMBS so Real Studio includes our SQLDatabase plugin which provides the RecordSet functionality.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the result as RecordSet object.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
For this method to work, you need to have somewhere a property with SQLDatabaseMBS so Real Studio includes our SQLDatabase plugin which provides the RecordSet functionality.
SQLConnectionMBS.SQLSelectAsRecordSetMT(command as string, CommandType as integer = 0) as RecordSet
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the result as RecordSet object.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
The work is performed on an extra thread, so this function can yield time to other Real Studio threads. And it calles the Working event regularly. For best user experience run this command on a Real Studio thread, so your GUI stays responsive.
For this method to work, you need to have somewhere a property with SQLDatabaseMBS so Real Studio includes our SQLDatabase plugin which provides the RecordSet functionality.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 13.0, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the result as RecordSet object.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
The work is performed on an extra thread, so this function can yield time to other Real Studio threads. And it calles the Working event regularly. For best user experience run this command on a Real Studio thread, so your GUI stays responsive.
For this method to work, you need to have somewhere a property with SQLDatabaseMBS so Real Studio includes our SQLDatabase plugin which provides the RecordSet functionality.
SQLConnectionMBS.SQLSelectMT(command as string, CommandType as integer = 0) as string
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.4, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the first field's string value.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
If the result is a record set, the first field from the first row is returned.
This is basicly useful for commands like "select sqlite_version()".
The work is performed on an extra thread, so this function can yield time to other Real Studio threads. And it calles the Working event regularly. For best user experience run this command on a Real Studio thread, so your GUI stays responsive.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
method, SQL, MBS Real Studio SQL Plugin (SQL), class SQLConnectionMBS,
Plugin version: 10.4, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Executes a SQL command and returns the first field's string value.
Notes:
This is a convenience function.
Internally it creates a SQLCommandMBS with the given command and calls Execute.
If the result is a record set, the first field from the first row is returned.
This is basicly useful for commands like "select sqlite_version()".
The work is performed on an extra thread, so this function can yield time to other Real Studio threads. And it calles the Working event regularly. For best user experience run this command on a Real Studio thread, so your GUI stays responsive.
All text strings sent to the plugin must have a defined encoding. Else the internal text encoding conversions will fail.
The items on this page are in the following plugins: MBS Real Studio SQL Plugin.
Links
MBS Real Studio Plugins