User Tools

Site Tools


Sidebar

Databases

k22:k22.4:start

22.4.0 Component gb.db

This component allows you to access various database management systems (DBMS). These include:

  • PostgreSQL,
  • MySQL,
  • SQLite2,
  • SQLite3 or
  • ODBC.

The component has the following classes, which are presented in the following sections:

  • Blob,
  • Connection,
  • Connections,
  • DB,
  • Database,
  • DatabaseUser,
  • Field,
  • Index,
  • Result,
  • ResultField and
  • Table.

BLOB

Figure 22.4.0.1: Display of DB data (DB data type BLOB)

Hint


The DB component gb.db creates an intermediate layer between the specific database server or the SQLite library and the Gambas programme, so that you can always use the same code - regardless of which database backend you choose!

However, this only works if:

  • you create your database with the Database Manager or this component,
  • you consistently use the search, create and edit methods,
  • you do not enter the SQL values directly in the SQL query, but instead use the replacement function of the aforementioned methods (Find, Create, Edit) and
  • you do not use the Exec method, with which you can send SQL queries directly to the backend.

If you don't need the database independence, then you can do whatever you want! Well - let's do that then!

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k22/k22.4/start.txt · Last modified: 27.04.2024 by emma

Page Tools