Thread: How do I install PostgreSQL ODBC Drivers for Windows from Source?

How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"David Zoll"
Date:
I need to test ODBC access to PostgreSQL from Windows clients.  Since
the latest binary distribution (postdrv.exe version 6.50.0) seems to be
password protected, and nobody seems to know the password, I downloaded
the source.  Everything compiled fine in Visual C++ 6.0, and I now have
a psglodbc.dll file.

What do I do with it?  The PSQLODBC FAQ (at
http://404627944:81/post_down/odbc/psqlodbc_faq.html) says to copy the
file into c:\windows\system, but this is apparently insufficient, as the
driver doesn't show up in the drivers list under the ODBC Data Sources
section of Control Panel.

Has anyone here installed this driver from source?  How do you do it? 
How do we go about getting these instructions into the documentation?

Thank you very much in advance.

Sincerely,
-David Zoll, Programmer
NYSCUL

PS: If anyone has the password to actually run postdrv.exe, that would
be very much appreciated as well.


Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"Adam Lang"
Date:
I asked before, what do you mean it is password protected?  I (just 5
minutes ago to check) uninstalled the driver, downloaded it and reinstalled
it and nowhere was I asked for a password.

I'm downloading from here:
ftp://ftp.postgresql.org/pub/odbc/index.html

To try to register a dll, try typing: regsvr32 <path to dll>
I'm not sure if this is good enough for the odbc driver manager though.  I
asked earlier for that tyoe of info today.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "David Zoll" <dzoll@nyscul.org>
To: "PostgreSQL-interfaces" <pgsql-interfaces@postgresql.org>
Sent: Tuesday, January 16, 2001 2:40 PM
Subject: [INTERFACES] How do I install PostgreSQL ODBC Drivers for Windows
from Source?


>
> I need to test ODBC access to PostgreSQL from Windows clients.  Since
> the latest binary distribution (postdrv.exe version 6.50.0) seems to be
> password protected, and nobody seems to know the password, I downloaded
> the source.  Everything compiled fine in Visual C++ 6.0, and I now have
> a psglodbc.dll file.
>
> What do I do with it?  The PSQLODBC FAQ (at
> http://404627944:81/post_down/odbc/psqlodbc_faq.html) says to copy the
> file into c:\windows\system, but this is apparently insufficient, as the
> driver doesn't show up in the drivers list under the ODBC Data Sources
> section of Control Panel.
>
> Has anyone here installed this driver from source?  How do you do it?
> How do we go about getting these instructions into the documentation?
>
> Thank you very much in advance.
>
> Sincerely,
> -David Zoll, Programmer
> NYSCUL
>
> PS: If anyone has the password to actually run postdrv.exe, that would
> be very much appreciated as well.



Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
Stephen Davies
Date:
There are two versions of the ODBC driver at ftp.postgresql.org: one is 
the full package including installer, the other is just the driver 
itself.

Once you have installed with installer once, you can upgrade by just 
copying new versions of the driver to windows\system.

If for some reason you cannot get the installer to work, you can do the 
install by hand with regedit.

Find the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI and add the following:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL]
"Setup"="C:\\WINDOWS\\SYSTEM\\PSQLODBC.DLL"
"Driver"="C:\\WINDOWS\\SYSTEM\\PSQLODBC.DLL"
"APILevel"="1"
"ConnectFunctions"="YYN"
"CommLog"="0"
"Optimizer"="0"
"DriverODBCVer"="02.00"
"FileUsage"="0"
"SQLLevel"="1"
"UsageCount"=dword:00000001
"Fetch"="100"
"UniqueIndex"="1"
"ReadOnly"="0"
"UseCursors"="0"
"UnknownSizes"="0"
"TextAsLongVarchar"="0"
"UnknownsAsLongVarchar"="0"
"MaxVarcharSize"="254"
"MaxLongVarcharSize"="4094"
"ConnSettings"=""
"UseDeclareFetch"="0"
"BoolsAsChar"="0"
"ExtraSysTablePrefixes"="dd_;"
"Parse"="1"
"Ksqo"="1"
"CancelAsFreeStmt"="0"

(Note: check the above paths for your system)

Find the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers 
and add an entry "PostgreSQL= Installed".

HTH,
Stephen Davies

On Tue, 16 Jan 2001 15:13:39 -0500, "Adam Lang" said:
> I asked before, what do you mean it is password protected?  I (just 5
> minutes ago to check) uninstalled the driver, downloaded it and reinstalled
> it and nowhere was I asked for a password.
> 
> I'm downloading from here:
> ftp://ftp.postgresql.org/pub/odbc/index.html
> 
> To try to register a dll, try typing: regsvr32 <path to dll>
> I'm not sure if this is good enough for the odbc driver manager though.  I
> asked earlier for that tyoe of info today.
> 
> Adam Lang
> Systems Engineer
> Rutgers Casualty Insurance Company
> http://www.rutgersinsurance.com
> ----- Original Message -----
> From: "David Zoll" <dzoll@nyscul.org>
> To: "PostgreSQL-interfaces" <pgsql-interfaces@postgresql.org>
> Sent: Tuesday, January 16, 2001 2:40 PM
> Subject: [INTERFACES] How do I install PostgreSQL ODBC Drivers for Windows
> from Source?
> 
> 
> >
> > I need to test ODBC access to PostgreSQL from Windows clients.  Since
> > the latest binary distribution (postdrv.exe version 6.50.0) seems to be
> > password protected, and nobody seems to know the password, I downloaded
> > the source.  Everything compiled fine in Visual C++ 6.0, and I now have
> > a psglodbc.dll file.
> >
> > What do I do with it?  The PSQLODBC FAQ (at
> > http://404627944:81/post_down/odbc/psqlodbc_faq.html) says to copy the
> > file into c:\windows\system, but this is apparently insufficient, as the
> > driver doesn't show up in the drivers list under the ODBC Data Sources
> > section of Control Panel.
> >
> > Has anyone here installed this driver from source?  How do you do it?
> > How do we go about getting these instructions into the documentation?
> >
> > Thank you very much in advance.
> >
> > Sincerely,
> > -David Zoll, Programmer
> > NYSCUL
> >
> > PS: If anyone has the password to actually run postdrv.exe, that would
> > be very much appreciated as well.


========================================================================
Stephen Davies Consulting                              scldad@sdc.com.au
Adelaide, South Australia.                             Voice: 08-8177 1595
Computing & Network solutions.                         Fax: 08-8177 0133




Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
Cedar Cox
Date:
On Tue, 16 Jan 2001, David Zoll wrote:
> 
> I need to test ODBC access to PostgreSQL from Windows clients.  Since
> the latest binary distribution (postdrv.exe version 6.50.0) seems to be
> password protected, and nobody seems to know the password, I downloaded
> the source.  Everything compiled fine in Visual C++ 6.0, and I now have
> a psglodbc.dll file.

I know I've said this before, but I still suspect a virus is at work.  
David, where did you download postdrv.exe?  If the same file is running
correctly on someone else's system and asking for a password on yours,
something strange is going on, to say the least.  I've seen this before
with a different packager/installer, as well as self extracting winzip
archives being corrupted.  If you have anti-virus software, make sure you
update to the latest virus defs.  If not, at least go to www.pspl.com and
get the CIH virus cleaner (and run it from dos mode).  

-Cedar



Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"Andrea Aime"
Date:
Adam, 
there are two kinds of dll's. 
* A classical dll, made with c or c++, has just to be copied into
windows\system
* An ActiveX dll has to be registered with regsvr32.
I suspect that odbc driver dll is a classical dll, so it only has to
be copied into windows\system
Hope this helps
Andrea

Adam Lang wrote:
> 
> I asked before, what do you mean it is password protected?  I (just 5
> minutes ago to check) uninstalled the driver, downloaded it and reinstalled
> it and nowhere was I asked for a password.
> 
> I'm downloading from here:
> ftp://ftp.postgresql.org/pub/odbc/index.html
> 
> To try to register a dll, try typing: regsvr32 <path to dll>
> I'm not sure if this is good enough for the odbc driver manager though.  I
> asked earlier for that tyoe of info today.
> 
> Adam Lang
> Systems Engineer
> Rutgers Casualty Insurance Company
> http://www.rutgersinsurance.com
> ----- Original Message -----
> From: "David Zoll" <dzoll@nyscul.org>
> To: "PostgreSQL-interfaces" <pgsql-interfaces@postgresql.org>
> Sent: Tuesday, January 16, 2001 2:40 PM
> Subject: [INTERFACES] How do I install PostgreSQL ODBC Drivers for Windows
> from Source?
> 
> >
> > I need to test ODBC access to PostgreSQL from Windows clients.  Since
> > the latest binary distribution (postdrv.exe version 6.50.0) seems to be
> > password protected, and nobody seems to know the password, I downloaded
> > the source.  Everything compiled fine in Visual C++ 6.0, and I now have
> > a psglodbc.dll file.
> >
> > What do I do with it?  The PSQLODBC FAQ (at
> > http://404627944:81/post_down/odbc/psqlodbc_faq.html) says to copy the
> > file into c:\windows\system, but this is apparently insufficient, as the
> > driver doesn't show up in the drivers list under the ODBC Data Sources
> > section of Control Panel.
> >
> > Has anyone here installed this driver from source?  How do you do it?
> > How do we go about getting these instructions into the documentation?
> >
> > Thank you very much in advance.
> >
> > Sincerely,
> > -David Zoll, Programmer
> > NYSCUL
> >
> > PS: If anyone has the password to actually run postdrv.exe, that would
> > be very much appreciated as well.


Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"David Zoll"
Date:
Stephen Davies wrote:
> 
> There are two versions of the ODBC driver at ftp.postgresql.org: one is
> the full package including installer, the other is just the driver
> itself.
> 
> Once you have installed with installer once, you can upgrade by just
> copying new versions of the driver to windows\system.
> 
> If for some reason you cannot get the installer to work, you can do the
> install by hand with regedit.
> 
> Find the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI and add
>  the following:
> 
> REGEDIT4
> 
> [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL]
> "Setup"="C:\\WINDOWS\\SYSTEM\\PSQLODBC.DLL"
> "Driver"="C:\\WINDOWS\\SYSTEM\\PSQLODBC.DLL"
> "APILevel"="1"
> "ConnectFunctions"="YYN"
> "CommLog"="0"
> "Optimizer"="0"
> "DriverODBCVer"="02.00"
> "FileUsage"="0"
> "SQLLevel"="1"
> "UsageCount"=dword:00000001
> "Fetch"="100"
> "UniqueIndex"="1"
> "ReadOnly"="0"
> "UseCursors"="0"
> "UnknownSizes"="0"
> "TextAsLongVarchar"="0"
> "UnknownsAsLongVarchar"="0"
> "MaxVarcharSize"="254"
> "MaxLongVarcharSize"="4094"
> "ConnSettings"=""
> "UseDeclareFetch"="0"
> "BoolsAsChar"="0"
> "ExtraSysTablePrefixes"="dd_;"
> "Parse"="1"
> "Ksqo"="1"
> "CancelAsFreeStmt"="0"
> 
> (Note: check the above paths for your system)
> 
> Find the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
> and add an entry "PostgreSQL= Installed".

Thank you very much, that seems to have done it :-)

In my opionion, the above really should go in a README or INSTALL file
in the ODBC Driver source distribution.  Who do I talk to about getting
that included in the next release?

Sincerely,
-David Zoll, Programmer
NYSCUL


Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"David Zoll"
Date:

Adam Lang wrote:
> 
> I asked before, what do you mean it is password protected?

If you had asked before, I must have missed it.  I apologize.

I mean the following:1) I download ftp://ftp.postgresql.org/pub/odbc/latest/postdrv.exe2) I run it3) A popup window
appearswith the title "InstallShield    Self-extracting EXE", which asks me "This will install PostgreSQL   ODBC Driver
v6.50.0000.Do you wish to continue?"4) I click on "OK"5) Another popup window appears with the title "InstallShield
Self-extractingExe" (yes the case is different on "Exe"), which   says "Please enter the password required to extract
theattached    files."  It has a text field, presumably for entering in a    password.6) I enter something in (or even
nothing).7)My machine dings, and another popup window appears with the title    "InstallShield Self-extracting EXE"
(backto the original all-caps   EXE), informing me that "You have entered an incorrect password."8) I hit the "OK"
button.9)The program exits, having extracted and installed nothing.
 


> I (just 5 minutes ago to check) uninstalled the driver, 
> downloaded it and reinstalled it and nowhere was I asked for a 
> password.

Then there must be something different between our machines that is
causing a problem on mine.  I've found archives of two other requests
for such a password, so while the problem may be rare, it is not unique
to my machine.


> I'm downloading from here:
> ftp://ftp.postgresql.org/pub/odbc/index.html

As am I.

> To try to register a dll, try typing: regsvr32 <path to dll>
> I'm not sure if this is good enough for the odbc driver manager 
> though.  I asked earlier for that tyoe of info today.

Stephen Davies posted excellent instructions that registered the driver
with the ODBC system, so that's no longer a problem for me, but I think
it might still be a good thing to figure out what is breaking in the
installer program so others don't have this problem in the future.  Does
anyone know where to get the files used to generate the installer?


Sincerely,
-David Zoll, Programmer
NYSCUL


Re: How do I install PostgreSQL ODBC Drivers for Windowsfrom Source?

From
"David Zoll"
Date:
Cedar Cox wrote:
> 
> On Tue, 16 Jan 2001, David Zoll wrote:
> >
> > I need to test ODBC access to PostgreSQL from Windows clients.
> > Since the latest binary distribution (postdrv.exe version 6.50.0) 
> > seems to be password protected, and nobody seems to know the 
> > password, I downloaded the source.  Everything compiled fine 
> > in Visual C++ 6.0, and I now havea psglodbc.dll file.
> 
> I know I've said this before, but I still suspect a virus is at 
> work. David, where did you download postdrv.exe?

Directly from ftp://ftp.postgresql.org/pub/odbc/latest/, three separate
times.


> If the same file is running correctly on someone else's system 
> and asking for a password on yours, something strange is going on,
> to say the least.

So far I've only heard one person say the installer actually works, and
found at least two other messages in mailing list archives asking for
the password.  Last time I asked here, your virus suggestion was the
only response.


> I've seen this before with a different packager/installer, as well 
> as self extracting winzip archives being corrupted.  If you have 
> anti-virus software, make sure you update to the latest virus defs.  
> If not, at least go to www.pspl.com and get the CIH virus cleaner 
> (and run it from dos mode).

I've tried the CIH virus cleaner, and I've checked with Innoculan with
the latest virus updates.  As far as I can tell my machine is clean of
any and all known viruses.

That doesn't mean that I don't have a corrupted or misversioned DLL file
somewhere.  If the installer program truly does work, than a bad DLL on
my machine is most likely the problem.

Thank you very much for your help.

Sincerely,
-David Zoll, Programmer
NYSCUL


Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"Adam Lang"
Date:
I honestly do not know what to say about the password problem.  I've had
installed the drivers several times on different PCs and not a problem has
arisen.  Never installed it on NT though.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "David Zoll" <dzoll@nyscul.org>
To: "Adam Lang" <aalang@rutgersinsurance.com>
Cc: "PostgreSQL-interfaces" <pgsql-interfaces@postgresql.org>



Re: Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"Ross J. Reedstrom"
Date:
I just pulled a fresh copy from ftp://ftp.postgresql.org/pub/odbc/latest/
It's 1154726 bytes in size. I started an install on NT 4.0


On Wed, Jan 17, 2001 at 01:44:22PM -0500, David Zoll wrote:
> 
> 
> Adam Lang wrote:
> > 
> > I asked before, what do you mean it is password protected?
> 
> If you had asked before, I must have missed it.  I apologize.
> 
> I mean the following:
>  1) I download ftp://ftp.postgresql.org/pub/odbc/latest/postdrv.exe
>  2) I run it
>  3) A popup window appears with the title "InstallShield 
>     Self-extracting EXE", which asks me "This will install PostgreSQL
>     ODBC Driver v6.50.0000. Do you wish to continue?"
>  4) I click on "OK"

Yep, same to here.

>  5) Another popup window appears with the title "InstallShield 
>     Self-extracting Exe" (yes the case is different on "Exe"), which
>     says "Please enter the password required to extract the attached 
>     files."  It has a text field, presumably for entering in a 
>     password.

Nope. don't get this at all. Are you running as an Adminstrator? Perhaps
NT is complaining about where the zip extractor is trying to write its
files, and the extractor then tries the password route.

> 
> > I'm downloading from here:
> > ftp://ftp.postgresql.org/pub/odbc/index.html
> 
> As am I.

Ditto


On Wed, Jan 17, 2001 at 02:04:17PM -0500, Adam Lang wrote:
> I honestly do not know what to say about the password problem.  I've had
> installed the drivers several times on different PCs and not a problem has
> arisen.  Never installed it on NT though.
> 

I'm installing on NT 4.0.

Ross


Re: Re: How do I install PostgreSQL ODBC Drivers for Windows from Source?

From
"Ross J. Reedstrom"
Date:
On Wed, Jan 17, 2001 at 02:42:03PM -0600, Ross J. Reedstrom wrote:
> I just pulled a fresh copy from ftp://ftp.postgresql.org/pub/odbc/latest/
> It's 1154726 bytes in size. I started an install on NT 4.0
> 
> I'm installing on NT 4.0.

And it completed successfully (sorry I didn't make that clear)

Ross


Re: Re: How do I install PostgreSQL ODBC Drivers for Windowsfrom Source?

From
Bob Kline
Date:
On Wed, 17 Jan 2001, David Zoll wrote:

> So far I've only heard one person say the installer actually works,

I just downloaded and went through the steps you described for
installing postdrv.exe from ftp.postgresql.org, and it worked fine, so
if there's any reluctance to believe that it works because only one
person said so, now you have two. :->}

-- 
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com



Re: Re: How do I install PostgreSQL ODBC Drivers for Windowsfrom Source?

From
Jens Carlberg
Date:
> So far I've only heard one person say the installer actually works,
> and found at least two other messages in mailing list archives asking
> for the password.  Last time I asked here, your virus suggestion was
> the only response.

To add to the information base, I have installed the driver in at least
two diffferent versions on about three Win-98 machines, with succesful
installations.

I _have_ seen the password problem (on Win-98), but I can't remember
what I did wrong. But in the end there was nothing wrong with the
zip-file, it was something else.

///Jens Carlberg



Re: Re: How do I install PostgreSQL ODBC Drivers for Windowsfrom Source?

From
Cedar Cox
Date:
On Wed, 17 Jan 2001, David Zoll wrote:
> 
> That doesn't mean that I don't have a corrupted or misversioned DLL file
> somewhere.  If the installer program truly does work, than a bad DLL on
> my machine is most likely the problem.

... Not unlikely knowing windows..  Perhaps someone could contact the
Install Shield people?  Surely they would know something about this.