Page 1 of 1

Creating Connections via code

Posted: Wed 11 Jan 2017 20:08
by PKBolland
We use a lot of dev databases within the company and I have a script that reads all databases and creates and xml connections file for use by another software package. I want to know if its possible to apply the same principle to dbForge by writing connection entries directly into the windows registry. Is it possible to get information on what registry keys are used to support connections.

Or is there an alternative method available.

Thanks

Re: Creating Connections via code

Posted: Thu 12 Jan 2017 10:29
by YuriP
Hello,

You could find dbForge Connections in registry branch:

Code: Select all

HKEY_CURRENT_USER\SOFTWARE\Devart\dbForge Common Settings\Connections\PostgreSql
You could also set custom connections in command line directly.
For example:

Code: Select all

set p=C:\Program Files\Devart\dbForge Data Compare for PostgreSQL
set ds=/source connection:"Host=db;Port=5444;Database=dc1;User ID=postgres;Password=postgres;"
set dt=/target connection:"Host=db;Port=5444;Database=dc2;User ID=postgres;Password=postgres;"

"%p%\datacompare.com" /datacompare %ds% %dt%
For getting more detail information about command line use the command:

Code: Select all

set p=C:\Program Files\Devart\dbForge Data Compare for PostgreSQL

"%p%\datacompare.com" /datacompare /?
Best regards,
Yuri.

Re: Creating Connections via code

Posted: Wed 18 Jan 2017 22:00
by PKBolland
Thanks YuriP.