Knowledge Base



KB10727 - Connecting DK application to SQL layers on two different databases.

The DK uses connection sharing to limit the number of active database connections. With an application involving separate databases, it is important to ensure the projects do not use the same connection string, like in this example:

[TatukGIS Layer]
Storage=Native
LAYER=somename1
DIALECT=MSJET
ADO=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=somedata.mdb

[TatukGIS Layer]
Storage=Native
LAYER=somename2
DIALECT=MSJET
ADO=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=somedata.mdb

As you see, the "ADO=" entry looks identical in both cases. To access two different databases in a reliable way, use a path (full path is preferable) like this:

[TatukGIS Layer]
Storage=Native
LAYER=somename1
DIALECT=MSJET
ADO=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\data\dir1\somedata.mdb

[TatukGIS Layer]
Storage=Native
LAYER=somename2
DIALECT=MSJET
ADO=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\data\dir2\somedata.mdb

 

Created: November 07, 2006, Modified: September 23, 2015
follow us on Facebook  follow us on Twitter  follow us on Google +  follow us on LinkedIn  Embarcadero