

This means that the first row of the List property of a ListBox is row number 0 (zero). Items in single-column ListBoxes can be accessed using the List property. With some programming, you can create hierarchical lists that use disclosure triangles to show nested items. You can control font style on a cell-by-cell basis and set the column alignment. You can add a checkbox and/or a picture to a row and make a cell or column editable. So if you are coming from another tool or are simply looking to make your next great app using Xojo, rest assurred that you can connect to the database you need.The scrollable ListBox control, used to display one or more columns of information. Working with database using Xojo is easy and consistent. These and other database topics are covered in the User Guide. You can interate through the RecordSet to get the data to display or modify it.

You use the SQLSelect method to query the data and the SQLExecute method to run commands. When you query data, the results are stored in a RecordSet. Regardless of how you connected to the database, accessing the data is achieved the same way. View ODBC in the Reference Guide, User Guide and the ODBC webinar for more information: This example prompts you to choose a previously configured ODBC connection (called a DataSourceName or DSN) and attempts to connect to it: Dim db As New ODBCDatabase Then you usually need to configure it using the ODBC Control Panel or ODBC Adminitrator Tool for your system.
XOJO LOOP THROUGH CONTAINERCONTROLS DRIVER
In order to use ODBC to connect to a database you first have to make sure the ODBC driver is installed on your system. It can be used to connect to database servers for which we do not provide a plugin, such an IBM iSeries (AS/400) database or Microsoft Access. For more information refer to the topics in the Reference Guide, User Guide and our webinars: This example connects to a PostgreSQL database server: Dim db As New PostgreSQLDatabaseĬonnecting to other database servers is similar. Xojo has built-in support for these database servers: PostgreSQL, MySQL, Oracle and Microsoft SQL Server.Īlthough you need to have a database server installed somewhere that is accessible to your app, connecting to one is just as easy as it is with SQLite. The big advantage of a database server is that they are designed for multiple concurrent users.

XOJO LOOP THROUGH CONTAINERCONTROLS PRO
You’ll need a Desktop, Web, Pro or Enterprise version of Xojo.Ī database server is much more powerful than SQLite, but also more complicated.You’ll need to make sure the appropriate plugin is coped to your Plugins folder.The other database options are fall under the “server” category. SQLite is so useful that it is sometimes used to save app preferences and even as a custom file format for some apps! SQLite also works well with web apps that primarily display data and have a low volume of concurrent database writes.Ĭonnecting to a SQLite database is easy: Dim dbFile As FolderItem = GetFolderItem("MyDatabase.sqlite")įor more information on using SQLite, refer to its entries in the Reference Guide and User Guide:

SQLite is a great choice for local databases used by your desktop apps. SQLite is referred to as an “embedded” database because the database engine is embedded into your application. To use SQLite with Xojo, you use the SQLiteDatabase class A similar SQLiteDatabase class is also used for iOS. As of 2015r4, Xojo uses SQLite 3.9.2 (SQLite 3.8.8 is used on iOS). A must-read for anyone building their first database application. Xojo can connect to a wide variety of databases, including: SQLite, PostgreSQL, MySQL, Oracle, Microsoft SQL Server and pretty much anything else using ODBC.
