Simple Console Example?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dirk_kaiser
Posts: 1
Joined: Tue 31 Mar 2009 13:37

Simple Console Example?

Post by dirk_kaiser » Tue 31 Mar 2009 13:46

I'm test driving myDAC out before purchasing. From my understanding, myDAC can be used from a console app. Can anyone provide me a simple console example of myDAC connecting to a MySQL database and executing a SQL command? I don't see any examples anywhere on how to do this.

Thanks,

Dirk

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 01 Apr 2009 14:21

You can use MyDAC component in console applications in the same way as in the Windows applications.
To connect to a MySQL database you should use TMyConnection. To execute a SQL query you can use TMyCommand or TMyQuery.
You can see how to work with MyDAC components in the MyDacDemo.

Post Reply