Showing 1775 items
revOpenDatabase(databaseType,host[:port], databaseName, [userName],[password] [, databaseSpecificOption |valentinaCacheSize,valentinaMacSerial,valentinaWindowsSerial])
|Summary||Connects to a MySQL, Oracle, |
|See Also||revExecuteSQL command, revSetDatabaseDriverPath command, revLicenseType function, revDatabaseID function, revDatabaseConnectResult function, revDatabaseTableNames function, revQueryIsAtStart function|
|Security Requirements||No requirements|
get revOpenDatabase("mysql", "www.example.com", "RatesDB", myUsr, myPass)
get revOpenDatabase("odbc", "BizFile", , "jenkins" ,the dbPassword of me, "emulated static")
get revOpenDatabase("valentina", "", "::Project:MyVal.vdb", , , , the serialNumber of this card, "")
get revOpenDatabase("valentina", "", "G:dataexpense.vdb", , , , , field "Valentina serial")
get revOpenDatabase("mysql", "www.example.com", "RatesDB", myUsr, myPass, 0)
get revOpenDatabase("sqlite", "C:/testdbsqlite.db", , , , )
|Summary||Connects to a MySQL, Oracle, |
Use the revOpenDatabase
The databaseType is one of "mysql","oracle" (LiveCode Enterprise only), "odbc", "postgresql", "valentina" or "sqlite".
The host is the
The port is the
The databaseName is the name of the
Important! When connecting to a Valentina
The userName is your authorized user name for the
The password is the authentication password for userName. (Some
The databaseSpecificOption is currently used by MySQL and ODBC databases only, on other databases this parameter has no effect. When connecting to MySQL databases the databaseSpecificOption specifies whether to use SSL for the connection or not, the default is false. When connecting to ODBC databases, the databaseSpecificOption specifies which type of database cursor to use. The possible options are described below under the title "ODBC Cursor Types".
determines whether a connection to a MySQL
The valentinaCacheSize is the size in
The valentinaMacSerial or valentinaWindowsSerial is the serial number that unlocks the Valentina VXCMD. (On
To use a DSN to identify an ODBC database, use the DSN as the host, and leave the databaseName
When using a Valentina database, specify the valentinaCacheSize for greatest efficiency based on the size of your
When connecting to a Valentina database, the valentinaMacSerial and valentinaWindowsSerial
If the database is not successfully opened, the revOpenDatabase
ODBC Cursor Types
When connecting to an ODBC database, it is possible to specify which type of cursor LiveCode should use. This is done by passing the desired cursor type to the revOpenDatabase function in the databaseSpecificOption paramete. The possible options are explained below.
"static" - This is a scrollable static cursor. Using this cursor it is possible to navigate backwards as well as forwards through record sets, and to move straight to the first or last record. Static cursors operate on an "offline" copy of the data, meaning that any changes to the data will not be detected by the cursor. Not all ODBC drivers support static cursors, for example FileMaker 6 does not.
"emulated static" - This cursor has the same behavior as a static cursor, except it allows ODBC to emulate the cursor's behavior if the driver does not support it. ODBC can typically emulate static cursor behavior on Windows systems only.
"forward only" - This is a cursor that can be scrolled forwards only. All ODBC drivers must support this type of cursor. Forward only cursors are usually faster than scrollable static cursors, but using revMoveToPreviousRecord, revMoveToFirstRecord or revMoveToLastRecord will fail. Forward only is the default cursor type, and is what was used in LiveCode 2.8.1 and earlier.
If the specified cursor type is not supported by the driver the an error string will be returned.
* LiveCode Enterprise: (and applications created with LiveCode Enterprise): Full access to all
* Other editions: Other editions cannot be used for direct access to Oracle databases.
Important! The revOpenDatabase
The ability to specify different cursor types for ODBC connections was added in version 2.9
The ability to connect to SQLite databases was added in version 2.8.1
The ability to specify whether SSL is used for MySQL database connections was added in version 2.1. In version 2.0 and later, SSL was used automatically. In versions before 2.0, SSL was not used.
The revOpenDatabase synonym was added in version 2.0.
The ability to connect to PostgreSQL databases was added in version 2.0.
The ability to connect to Valentina databases was added in version 1.1.1.