4

What's proper way to connect ODBC datasources and execute some SQL statements?

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

2 Answers 2

6

You can use the ADO components:

1) Drag a TAdoConnection from the dbGo tab.

2) Right click and choose Edit connection string.

3) Click build

4) Select Microsoft OLE DB Provider for ODBC

5) Click Next

Then you will be able to select a database.

You can drag a TAdoQuery and connect it to the TAdoConnection to execute some queries.

The rest should be straight forward.

Sign up to request clarification or add additional context in comments.

Comments

1

ADO (under the dbGo components component group) as well as dbExpress (under the dbExpress component group) come to mind.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.