We provide a thin layer on top with SQLDatabaseMBS class to make it compatible to the Xojo database class. MBS Database connections are implemented via SQLConnectionMBS and SQLCommandMBS classes. ![]() This can be disabled by setting Option("Ping") = "false". The class pings the database every minute by checking whether it's alive and to avoid server dropping connection. You can use InternalPostgreSQLLibraryMBS or InternalSQLiteLibraryMBS if you like to use our built in SQLite or PostgreSQL database libraries. When using RecordSet, the values are read via Value() functions automatically. When you call Field() you always get last row, but to read from cached result set, please use Value() function. After this you can walk over the recordset and use FetchPos, FetchFirst, FetchLast, FetchPrev and FetchNext to locate the rows you need. The plugin will than fetch all records and store them in memory. To enable you can call SQLCommandMBS.Cache or use the Option("AutoCache") = "true" on either command or connection or database objects. The plugin can cache the recordset locally. If you close a database connection while you have RecordSets and SQLCommand in use, things may go wrong. The plugin keeps references from RecordSets and SQLCommand to prevent automatic destruction of the database connection. Please free all RecordSets and SQLCommand objects before you close the SQLConnection or the SQLDatabase. ![]() But some features like getting a recordset do need the license as they refer to the SQLDatabaseMBS class. The SQLConnectionMBS class does not require this license. With Xojo 2013r1, you only need a database server license from Xojo, Inc. Supported databases: CubeSQL, Centura SQLBase, DB2, DuckDB, Firebird, Informix, InterBase, MariaDB, Microsoft Access, Microsoft SQL Server, MySQL, ODBC, Oracle Database Server, PostgreSQL, SQL Anywhere, SQLite, SQLCipher and Sybase.Ĭonnect to Microsoft Access, FileMaker Server (or Pro), Microsoft Visual FoxPro and others via ODBC. autodisconnect will ocur in destructor if needed SQLServer, InterBase, SQLBase and ODBCĭim server as string = "root", "",SQLConnectionMBS.kMySQLClient) Con.SetFileOption con.kOptionLibraryMySQL, ( "libmysqlclient.dylib")
0 Comments
Leave a Reply. |