Quick psqlODBC driver setting

Started by Bart Goldaabout 20 years ago2 messagesgeneral
Jump to latest
#1Bart Golda
e9syuk002@sneakemail.com

I would like to have an installation program, which creates psqlODBC
connection, so there will be no need of typing and clicking on two
hundred workstations... There is the driver's msi file which can be
installed very nicely, but what is the best way of creating the
connection itself without much pain? My current idea is like this:

1. Exporting the entry
"CONNECTION_NAME" REG_SZ "PostgreSQL ANSI" from
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

2. Exporting HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\CONNECTION_NAME

3. Running the reg file(s) on the target machine

Well, it works - more or less - but is this a *right way*? How do *you*
do it?

Regards,
Bart Golda

#2Rolf �stvik
rolfostvikjobb@yahoo.no
In reply to: Bart Golda (#1)
Re: Quick psqlODBC driver setting

"Bart Golda" <e9syuk002@sneakemail.com> wrote in
news:1141392904.522507.318380@e56g2000cwe.googlegroups.com:

I would like to have an installation program, which creates psqlODBC
connection, so there will be no need of typing and clicking on two
hundred workstations... There is the driver's msi file which can be
installed very nicely, but what is the best way of creating the
connection itself without much pain? My current idea is like this:

1. Exporting the entry
"CONNECTION_NAME" REG_SZ "PostgreSQL ANSI" from
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

2. Exporting HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\CONNECTION_NAME

3. Running the reg file(s) on the target machine

Well, it works - more or less - but is this a *right way*? How do *you*
do it?

As i see it this is the right way if you want to use DSN connections.

With DSN less connections it depends on the application you use.

(Newlines should be removed when examples is used)

--- Example for connect string in Microsoft Access          ---
ODBC;DRIVER={PostgreSQL};SERVER=servername;READONLY=
0;DATABASE=databasename;UID=username;PWD=password
--- End example for connect string in Microsoft Access      ---
--- ( "& _" indicates continuation of string on next line ) ---
--- Example for National Instruments TestStand v1.0.3       ---
--- and natiobnal Instruments SQL Toolkit for LabVIEW       ---
Provider=MSDASQL.1;Extended Properties="DRIVER=
{PostgreSQL};SERVER=servername;UID=username;PWD=password;READONLY=
0;MaxLongVarcharSize=30000;DATABASE=databasename;"
--- End example for National Instruments TestStand v1.0.3   ---
--- (I am using PostgrSQL ODBC driver v 07.01.0010 when using Teststand)    

--
Rolf �stvik