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.
#XOJO DATABASE EXAMPLE LICENSE#
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, 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")