![xojo database example xojo database example](http://valentina-db.com/docs/dokuwiki/v8/lib/exe/fetch.php?media=valentina:products:adk:v4rb:start:xojo_examples_db.png)
The following code creates a SQLite database and uses SQLExecute to create a table.
#Xojo database example how to#
Contact the vendor for more information on how to use them.Īdds support for cubeSQL Server, a database server built on SQLite.Īdds support for the Valentina stand-alone and server databases.Īdds support for the various server databases including 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. The following database plugins are also available. Supports the built-in SQLite data source. Use ODBCPlugin.xojo_plugin.Ĭonnects to Oracle 8i and above. Supports the MySQL Community edition server. Use MSSQLServerPlugin.xojo_plugin (Windows-only). Everything other than SQLiteDatabase requires that you copy the appropriate plugin to your Plugins folder.Ĭonnects to Microsoft SQL Server. The following subclasses of Database are included. Use one of the subclasses to connect to your database. The nextval and currval functions are used to access the next value in the sequence and the current value of the sequence respectively.The Database class is the base class for the database subclasses that communicate with a variety of databases. You use the Sequence in INSERT SQL statements like this:
![xojo database example xojo database example](https://pbs.twimg.com/media/FCVJwVXX0AsHSSG.jpg)
This SQL declares a sequence for the Team table with values starting at 1: You use the sequence when you create new rows in a table. A Sequence is a database object that manages unique values for use by primary keys. But the equivalent functionality is available by using Sequences (similar to how PostgreSQL works). Oracle does not allow you to create a primary key that auto-increments. This SQL creates the Team table used in previous examples:ĬREATE TABLE Team (ID INTEGER NOT NULL PRIMARY KEY, Name VARCHAR2(100), Coach VARCHAR2(100), City VARCHAR2(100)) Auto-Incrementing Primary Keys With this information, you can connect to the database on the server using the OracleDatabase class: