using two databases in one application

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

using two databases in one application

Post by jkuiper » Mon 18 May 2009 12:03

We want to expand our application with CRM. But these module must be separated from the original application and gets it's own CRM database. But the core application can put some records into the CRM database, depending when it exists.
Do I need two connections in Delphi on connection two databases?

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

Post by Dimon » Wed 20 May 2009 08:37

In order to connect simultaneously to two MySQL databases you should use two TMyConnection components.

jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

Post by jkuiper » Mon 25 May 2009 08:10

oke, thanks.

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Post by eduardosic » Wed 27 May 2009 01:10

jkuiper wrote:oke, thanks.
using 1 TMyConnection you can access two or more database..

try this..


Select
Field1, Field2
From
DatabaseName.Table1,
DatabaseName2.Table2

jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

Post by jkuiper » Thu 28 May 2009 09:35

Yes, I know. I just made an example with one connection and two databases.
The most imported thing is how the privileges are set.

Post Reply