Correct way to connect an ODBC data source with Delphi 2006+?

What is the right way to connect ODBC data sources and execute some SQL statements?

TQuery and other BDE components can do this, but if I understood correctly, are they now deprecated?

+4
source share
2 answers

You can use ADO components:

1) Drag TAdoConnection from the dbGo tab.

2) Right-click and select "Change connection string."

3) Click "Create"

4) Select Microsoft OLE DB Provider for ODBC

5) Click "Next"

Then you can select the database.

You can drag TAdoQuery and connect it to TAdoConnection to fulfill some queries.

The rest should be straight.

+6
source

ADO (under the dbGo component group of components), as well as dbExpress (under the dbExpress component group).

+1
source

Source: https://habr.com/ru/post/1277659/


All Articles