Creating Connections via code

Discussion of open issues, suggestions and bugs regarding database management and development tools for PostgreSQL
Post Reply
PKBolland
Posts: 5
Joined: Sun 04 Aug 2013 21:32

Creating Connections via code

Post by PKBolland » Wed 11 Jan 2017 20:08

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

YuriP
Posts: 11
Joined: Fri 27 May 2016 12:49
Location: Devart
Contact:

Re: Creating Connections via code

Post by YuriP » Thu 12 Jan 2017 10:29

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.

PKBolland
Posts: 5
Joined: Sun 04 Aug 2013 21:32

Re: Creating Connections via code

Post by PKBolland » Wed 18 Jan 2017 22:00

Thanks YuriP.

Post Reply