Thread: Latest ODBC driver?

Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
What's the current version please and where do I find it? Last time I asked this
question I was pointed at ftp://ftp.postgresql.org/pub/odbc/ which still seems
to be at 8.01.0200- I've spent most of the day trying to roll that out and had
enormous problems once it hits production quantities of data.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
"Joshua D. Drake" wrote:
>
> Mark Morgan Lloyd wrote:
> > What's the current version please and where do I find it? Last time I asked this
> > question I was pointed at ftp://ftp.postgresql.org/pub/odbc/ which still seems
> > to be at 8.01.0200- I've spent most of the day trying to roll that out and had
> > enormous problems once it hits production quantities of data.
>
> You could try ODBCng:
>
> http://projects.commandprompt.com/public/odbcng

I was tempted, but after nine hours solid work I decided that the best thing to
do was back out and revert to the old server. I'm afraid I'm very disgruntled
over this, the work has to be done on a Saturday and in the UK Monday (tomorrow)
is a holiday.

OK, subsidiary question: what are the prerequisites for the ODBC and ODBCng
drivers? I find the systems hare are still on ODBC 3.0 despite being NT4 SP6a.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Hiroshi Inoue
Date:
Mark Morgan Lloyd wrote:
> What's the current version please and where do I find it? Last time I asked this
> question I was pointed at ftp://ftp.postgresql.org/pub/odbc/ which still seems
> to be at 8.01.0200- I've spent most of the day trying to roll that out and had
> enormous problems once it hits production quantities of data.
>

Please install the 8.2.0002 version at
    http://pgfoundry.org/projects/psqlodbc/

regards,
Hiroshi Inoue


Re: Latest ODBC driver?

From
"Dave Page"
Date:


-----Original Message-----
From: pgsql-odbc-owner@postgresql.org on behalf of Hiroshi Inoue
Sent: Sun 8/27/2006 10:10 AM
To: Mark Morgan Lloyd
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Latest ODBC driver?

Mark Morgan Lloyd wrote:
>> What's the current version please and where do I find it? Last time I asked this
>> question I was pointed at ftp://ftp.postgresql.org/pub/odbc/ which still seems
>> to be at 8.01.0200- I've spent most of the day trying to roll that out and had
>> enormous problems once it hits production quantities of data.
>>
>
> Please install the 8.2.0002 version at
>     http://pgfoundry.org/projects/psqlodbc/

That's not such a good idea for production as you've now split the driver back into the Unicode and ANSI builds - Mark
wouldbe running with a driver setup incompatible with what we are about to release. 

Mark; if you can wait for the new release, I think you'll be much happier in the long term.

Regards, Dave

Re: Latest ODBC driver?

From
"Joshua D. Drake"
Date:
> I was tempted, but after nine hours solid work I decided that the best thing to
> do was back out and revert to the old server. I'm afraid I'm very disgruntled
> over this, the work has to be done on a Saturday and in the UK Monday (tomorrow)
> is a holiday.
>
> OK, subsidiary question: what are the prerequisites for the ODBC and ODBCng
> drivers? I find the systems hare are still on ODBC 3.0 despite being NT4 SP6a.
>

I have no idea if ODBCng would work on NT4. We only test on 2000+

Joshua D. Drake


--

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/



Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> Mark; if you can wait for the new release, I think you'll be much happier in the long term.

I can hold on a little while, scheduling the work isn't straightforward.

Three questions if I may:

i)   What is the the minimum acceptable ODBC DLL versions I think I saw 3.51
     somewhere? Knowing this I might be able to contribute some more coherent
     testing/debugging info.

ii)  Does the new driver insist on Unicode, and do I need to accomodate that
     in the app/database/table setup?

iii) How do I de-install the 8.01.0200 driver? The usual way of working from
     NT's control panel applet simply reinstalls it.

Apologies for all this, but I'm still running (firewalled) NT application
servers pending an eventual switch to Linux. I'd add that I've drummed up a lot
of enthusiasm for the Linux+PostgreSQL combination here and do my best to
promote it, but this sort of thing hardly bolsters my position.

My situation is that we're offering a "push" service 24 x 7 so I have some scope
for planned outages- it's not as though it's a web site. However upgrading the
server from 7.x to 8.x with few schema changes was not something I was
relishing- and while I've at least got an adequate amount of data on the new
server to test against I'm disappointed that all I've achieved is a dry run.

The problem as it was manifesting itself late last night was that one particular
program- which is actually pretty trivial- was grabbing memory at the rate of
around 50Kb per second. To say that it wasn't doing that when connected via the
old driver to the old server is an understatement :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mark
> Morgan Lloyd
> Sent: 27 August 2006 12:41
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Latest ODBC driver?
>
> Dave Page wrote:
>
> > Mark; if you can wait for the new release, I think you'll
> be much happier in the long term.
>
> I can hold on a little while, scheduling the work isn't
> straightforward.
>
> Three questions if I may:
>
> i)   What is the the minimum acceptable ODBC DLL versions I
> think I saw 3.51
>      somewhere? Knowing this I might be able to contribute
> some more coherent
>      testing/debugging info.

No idea - it's not something that came up before - iirc, the ODBC DM
hasn't changed much, if at all in the last few versions of MDAC.

> ii)  Does the new driver insist on Unicode, and do I need to
> accomodate that
>      in the app/database/table setup?

No, you use what you want and the driver handles it. There were (and
will continue to be) 2 drivers in 08.02, a Unicode one which most people
will use, and an ANSI one which is recommended for use with BDE apps,
and for people having trouble with their combination of LATINx charset
and whatever they're running on the server (a very small number of
people).

> iii) How do I de-install the 8.01.0200 driver? The usual way
> of working from
>      NT's control panel applet simply reinstalls it.

That works fine on 2K/XP/2K3, but I've never tried on NT. You could try:

msiexec uninstall psqlodbc.msi

From a command prompt.

Regards, Dave.

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> > i)   What is the the minimum acceptable ODBC DLL versions I
> > think I saw 3.51 somewhere? Knowing this I might be able to contribute
> > some more coherent testing/debugging info.
>
> No idea - it's not something that came up before - iirc, the ODBC DM
> hasn't changed much, if at all in the last few versions of MDAC.

Looking back through frenzied research last night when things started going pear
shaped, I find this in the 8.02.0200 release notes:

-----8<-----
4) standardised the build on ODBC version 3.51
----->8-----

Does this correspond to the versions of e.g. odbc32.dll as shown in the control
panel? If so my production machines are way out of date... they're on something
like 3.0 since the NT SPs haven't updated ODBC (can't be sure but I suspect they
might expect IE4 SP2 as a prerequisite).

> > ii)  Does the new driver insist on Unicode, and do I need to
> > accomodate that in the app/database/table setup?
>
> No, you use what you want and the driver handles it. There were (and
> will continue to be) 2 drivers in 08.02, a Unicode one which most people
> will use, and an ANSI one which is recommended for use with BDE apps,
> and for people having trouble with their combination of LATINx charset
> and whatever they're running on the server (a very small number of
> people).

Noted comment about the BDE- I'm still using that but trying to work to a point
where I can junk it: IMO it's the worst of all worlds. On the other hand once I
get rid of BDE I'm not sure whether I'll continue using ODBC or go direct. Are
there any specific issues I should be watching out for with BDE and the ANSI
driver?

> > iii) How do I de-install the 8.01.0200 driver? The usual way
> > of working from
> >      NT's control panel applet simply reinstalls it.
>
> That works fine on 2K/XP/2K3, but I've never tried on NT. You could try:
>
> msiexec uninstall psqlodbc.msi

I can confirm after another test that NT's control panel "Add/Remove" goes
through an unprompted install ending up with the congratulations dialogue.

Running the command as above... any attempt to run msiexec from the command line
or to execute psqlodbc.msi (relying on its association) with parameters results
in an "Incorrect command line parameters" box reporting v 2.00.2600.2. Frankly
I'm not entirely sure how this version got onto the machines- I suspect with
v7's ODBC.

Courtesy of Google hence
http://www.installshield.com/news/newsletter/0411-articles/msiexec.asp, the
format appears to be

msiexec /x psqlodbc.msi

I note that according to that URL appending /qf should display "Full Wizard"
dialogues, but instead it appears to something odd like a silent de-install with
a final "installed" dialogue :-/

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mark
> Morgan Lloyd
> Sent: 27 August 2006 22:49
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Latest ODBC driver?
>
> Does this correspond to the versions of e.g. odbc32.dll as
> shown in the control
> panel?

No - it's just the version of the spec that the driver supports.

> Noted comment about the BDE- I'm still using that but trying
> to work to a point
> where I can junk it: IMO it's the worst of all worlds. On the
> other hand once I
> get rid of BDE I'm not sure whether I'll continue using ODBC
> or go direct. Are
> there any specific issues I should be watching out for with
> BDE and the ANSI
> driver?

No - it's th eUnicode one that disagrees with BDE - specifically,
text/varchar columns will all be empty if requested as Unicode strings -
which is exactly what BDE does because the driver offers that as the
default.

> Courtesy of Google hence
> http://www.installshield.com/news/newsletter/0411-articles/msi
exec.asp, the
> format appears to be
>
> msiexec /x psqlodbc.msi

/x and /uninstall are equivalent in Installer 3.x. I guess not in 2.x

Regards, Dave

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> > Does this correspond to the versions of e.g. odbc32.dll as
> > shown in the control panel?
>
> No - it's just the version of the spec that the driver supports.

OK, so if I read you correctly that's the version of the spec that the low-level
drivers tell the ODBC DLLs they're prepared to implement.

> > Noted comment about the BDE- I'm still using that but trying to work to a
> > point where I can junk it: IMO it's the worst of all worlds. On the other
> > hand once I get rid of BDE I'm not sure whether I'll continue using ODBC
> > or go direct. Are there any specific issues I should be watching out for
> > with BDE and the ANSI driver?
>
> No - it's th eUnicode one that disagrees with BDE - specifically,
> text/varchar columns will all be empty if requested as Unicode strings -
> which is exactly what BDE does because the driver offers that as the
> default.

OK, I think I've got an issue here relating to the BDE and the ANSI driver :-(

Running the failing program with the 8.01.0200 drivers and the 3.50.33.8 ODBC
DLLs memory usage explodes when it tries to execute the initial query, which is
basically there to establish communications with the tables. At present I think
that the problem is hidden somewhere inside the BDE but I'll see if I can
progress this further later.

Are there any connect settings that I need to know about that might be relevant,
or any other issues that anybody can recollect relating to the BDE?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mark
> Morgan Lloyd
> Sent: 29 August 2006 11:51
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Latest ODBC driver?
>
> Dave Page wrote:
>
> > > Does this correspond to the versions of e.g. odbc32.dll as
> > > shown in the control panel?
> >
> > No - it's just the version of the spec that the driver supports.
>
> OK, so if I read you correctly that's the version of the spec
> that the low-level
> drivers tell the ODBC DLLs they're prepared to implement.

Yeah.

>
> OK, I think I've got an issue here relating to the BDE and
> the ANSI driver :-(
>
> Running the failing program with the 8.01.0200 drivers and
> the 3.50.33.8 ODBC
> DLLs memory usage explodes when it tries to execute the
> initial query, which is
> basically there to establish communications with the tables.
> At present I think
> that the problem is hidden somewhere inside the BDE but I'll
> see if I can
> progress this further later.

Don't use 08.01.xxxx if you can help it - it's totally different from
08.02. A closer match would be the older 07 series.

08.01 was a change in architecture that unfortunately didn't work out
well. 08.02 is going back to the original architecture.

Regards, Dave.

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> 08.01 was a change in architecture that unfortunately didn't work out
> well. 08.02 is going back to the original architecture.

Ahhhhhhhh- OK, sounds like it might be worth my while looking at the development
version, also at ODBCng.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Stijn Vanroye
Date:
Mark Morgan Lloyd Wrote:

> Dave Page wrote:
>
> > 08.01 was a change in architecture that unfortunately
> didn't work out
> > well. 08.02 is going back to the original architecture.
>
> Ahhhhhhhh- OK, sounds like it might be worth my while looking
> at the development version, also at ODBCng.

Since we have some problems which are probably related to the 08.01 architectural change too, I'm a bit interested in
thistopic. I would like to try out the 08.02 branch too. I have a few questions: 

1. Is there any indication to when the 08.02 will be offically released as stable?

2. On pgFoundry I can only find the psqlODBC 08.02.0002 version. I already have the latest stable (08.01.0200)
installed.But the upgrade.bat with the 08.02.0002 says that I must have the 08.02.xxxx installed from the official MSI
installation.How can I safely upgrade/install the 08.02.0002 version? And where do I find the "offical MSI
installation"?I'm not that experienced in working with development snapshots and such ;) 

3. The problems we are having are related to lo (BLOB) fields. Maybe somebody can tell me if this is indeed related to
theversion of the ODBC drivers. 
I'm using Delphi in combination with ADO as a development enviroment.
I make my databaseconnection using a TADOConnection component. Next I use a TADODataSet where I perform my database
operations.I can't work with fields of the type LO because in delphi the fieldtype needed for this is a TBlobField, but
thereal problem is that all lo fields get recognized as a TIntegerField. This means that I can't use any of the
operationsfor working with BLOB's... I don't know if it are Delphi's ADO components who incorrectly recognize the
fieldtype,or the ODBC driver, or the backend. We have worked with Delphi, ODBC and BLOB fields before without problems.
Westarted using the 08.01 branch along with the 8.x backend, since this one is the first one available for Windows. It
couldbe a change in the ODBC, or the backend, I don't know. Any tips or clarification to put me on the right search
pathwould be welcome. 

Kind regards,

Stijn Vanroye

www.easytowork.nl
www.xillion.nl


Re: Latest ODBC driver?

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Stijn Vanroye
> Sent: 29 August 2006 12:50
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Latest ODBC driver?
>
> 1. Is there any indication to when the 08.02 will be
> offically released as stable?

As soon as Hiroshi Inoue let's me know that he's committed the
outstanding patches he was polishing off. I hope sometime this week.

> 2. On pgFoundry I can only find the psqlODBC 08.02.0002
> version. I already have the latest stable (08.01.0200)
> installed. But the upgrade.bat with the 08.02.0002 says that
> I must have the 08.02.xxxx installed from the official MSI
> installation. How can I safely upgrade/install the 08.02.0002
> version? And where do I find the "offical MSI installation"?
> I'm not that experienced in working with development
> snapshots and such ;)

Ignore that. Just uninstall the old driver and install the new. The
upgrade script is only there to upgrade to the latest 08.02 version.
Note that the driver name will probably change before release, but will
be set in stone once the first 08.02 stable release is out.

> 3. The problems we are having are related to lo (BLOB)
> fields. Maybe somebody can tell me if this is indeed related
> to the version of the ODBC drivers.
> I'm using Delphi in combination with ADO as a development enviroment.
> I make my databaseconnection using a TADOConnection
> component. Next I use a TADODataSet where I perform my
> database operations. I can't work with fields of the type LO
> because in delphi the fieldtype needed for this is a
> TBlobField, but the real problem is that all lo fields get
> recognized as a TIntegerField. This means that I can't use
> any of the operations for working with BLOB's... I don't know
> if it are Delphi's ADO components who incorrectly recognize
> the fieldtype, or the ODBC driver, or the backend. We have
> worked with Delphi, ODBC and BLOB fields before without
> problems. We started using the 08.01 branch along with the
> 8.x backend, since this one is the first one available for
> Windows. It could be a change in the ODBC, or the backend, I
> don't know. Any tips or clarification to put me on the right
> search path would be welcome.

I never used BLOBs (or Delphi) so cannot help with that I'm afraid.

Regards, Dave.

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Thanks for all that, noted.

> > 3. The problems we are having are related to lo (BLOB) fields.

In my case I'm storing fairly large chunks ot text (script language source) in
one of the tables which I think Delphi/BDE will treat as a BLOB, but that one's
working fine. The problems I'm seeing are with three fairly simple tables, from
one of which an initial batch of records is being pulled- basically so that the
app can just put up a DBGrid to show that things are working. However the tables
that are being opened by the failing app are also being used- somewhat more
demandingly- by another which is working fine.

I'll post more if I manage to tie things down any better. My major objective is
to get the server update completed, but I've also got an interest in making sure
that this problem doesn't bite again in the future.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Hiroshi Inoue
Date:
Dave Page wrote:
>
>
>> -----Original Message-----
>> From: pgsql-odbc-owner@postgresql.org
>> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Stijn Vanroye
>> Sent: 29 August 2006 12:50
>> To: pgsql-odbc@postgresql.org
>> Subject: Re: [ODBC] Latest ODBC driver?
>>
>> 1. Is there any indication to when the 08.02 will be
>> offically released as stable?
>
> As soon as Hiroshi Inoue let's me know that he's committed the
> outstanding patches he was polishing off. I hope sometime this week.

I've committed most of my local source. I'm waiting for some response
about VPN problem but got no response. Anyway I would commit the rest
of changes tonight.

regards,
Hiroshi Inoue

Re: Latest ODBC driver?

From
Hiroshi Inoue
Date:
Dave Page wrote:
>
>
>> -----Original Message-----
>> From: pgsql-odbc-owner@postgresql.org
>> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Mark
>> Morgan Lloyd
>> Sent: 27 August 2006 22:49
>> To: pgsql-odbc@postgresql.org
>> Subject: Re: [ODBC] Latest ODBC driver?
>>
>> Does this correspond to the versions of e.g. odbc32.dll as
>> shown in the control
>> panel?
>
> No - it's just the version of the spec that the driver supports.
>
>> Noted comment about the BDE- I'm still using that but trying
>> to work to a point
>> where I can junk it: IMO it's the worst of all worlds. On the
>> other hand once I
>> get rid of BDE I'm not sure whether I'll continue using ODBC
>> or go direct. Are
>> there any specific issues I should be watching out for with
>> BDE and the ANSI
>> driver?
>
> No - it's the Unicode one that disagrees with BDE - specifically,
> text/varchar columns will all be empty if requested as Unicode strings -
> which is exactly what BDE does because the driver offers that as the
> default.

As for BDE, I'm not able to test it by myself unfortunately.
I have a little hope in the next release with the combination
of the Unicode driver and BDE.
At the Advanced Options (DataSource) Page 2 of setup dialog
you can see Extra opts option. Settng the option to 0x4 may
take some effect though I'm not sure.

You can test it using the snapshot driver at  http://www.geocities.jp/inocchichichi/psqlodbc/index.html
.
If you already installed the 8.2.0002 driver, you can
simply replace the dll psqlodbc35w.dll at the site.

regards,
Hiroshi Inoue


Re: Latest ODBC driver?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Hiroshi Inoue [mailto:inoue@tpf.co.jp]
> Sent: 30 August 2006 04:59
> To: Dave Page
> Cc: Stijn Vanroye; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Latest ODBC driver?
>
> Dave Page wrote:
> >
> >
> >> -----Original Message-----
> >> From: pgsql-odbc-owner@postgresql.org
> >> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Stijn Vanroye
> >> Sent: 29 August 2006 12:50
> >> To: pgsql-odbc@postgresql.org
> >> Subject: Re: [ODBC] Latest ODBC driver?
> >>
> >> 1. Is there any indication to when the 08.02 will be
> >> offically released as stable?
> >
> > As soon as Hiroshi Inoue let's me know that he's committed the
> > outstanding patches he was polishing off. I hope sometime this week.
>
> I've committed most of my local source. I'm waiting for some response
> about VPN problem but got no response. Anyway I would commit the rest
> of changes tonight.

OK thanks - please let me know when you're work is done.

Regards, Dave.

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Hiroshi Inoue wrote:

> > No - it's the Unicode one that disagrees with BDE - specifically,
> > text/varchar columns will all be empty if requested as Unicode strings -
> > which is exactly what BDE does because the driver offers that as the
> > default.
>
> As for BDE, I'm not able to test it by myself unfortunately.
> I have a little hope in the next release with the combination
> of the Unicode driver and BDE.
> At the Advanced Options (DataSource) Page 2 of setup dialog
> you can see Extra opts option. Settng the option to 0x4 may
> take some effect though I'm not sure.
>
> You can test it using the snapshot driver at  http://www.geocities.jp/inocchichichi/psqlodbc/index.html
> .
> If you already installed the 8.2.0002 driver, you can
> simply replace the dll psqlodbc35w.dll at the site.

I'm afraid that I'm not the bearer of particularly good news, but I thought it
worth summarising where I'm at. All the results below are from an NT4W SP6a
machine with ODBC DLLs 3.50.33.8 and BDE 4.51, nothing else particularly
remarkable about it; the old server is 7.1.2, the new one 8.1.3 both hosted on
Linux/Slackware.

Installing ODBC drivers 7.02.001 (Insight) my apps can connect to live data on
the old server using ODBC default settings, that's been the situation for around
five years. Needless to say if I change this and try to use the v7 drivers to
connect to the v8 server I get an error dialogue box from the app ("Key
violation. blank Alias: p0xDontClash", in my experience this is a pretty generic
error that happens when a query fails badly).

Removing the DSN and the ODBC v7 driver, installing 8.01.0200 and redoing the
DSN using the ANSI driver for connection to the new (v8) server. The app
establishes its initial connections without any problem, then at around the time
where I would have expected it to complete its initial query memory usage starts
increasing at around 50kB per second. Changing this to use the Unicode driver
behaves in a very similar fashion (the data comprises timestamps and numeric
values, with only a small amount of non-critical text). Reverting to the ANSI
driver and connecting to the v7 server appears to never complete the initial
query, but doesn't explode either.

Similarly switching from 8.01.0200 to 8.02.0002 and noting that this does not
provide an explicit ANSI driver, attempting to connect to the v8 server I get
"Unknown user name or password. Unexpected protocol character during
authentication; socket has been closed. The driver returned invalid (or failed
to return) SQL_DRIVER_ODBC_VER: 03.51 General SQL error.". Noting that the ODBC
DLLs on this machine are at 3.50 (not 3.51) is that the result of an explicit
version check?

Replacing the single file psqlodbc35w.dll (in c:\Program
Files\psqlODBC\0802\bin) with the latest snapshot driver from the URL above (and
rebooting at this point to make sure nothing was left in memory) reported a
driver version of 7.03.0284 but when trying to add a DSN from the NT Control
Panel I get "The setup routines for the PostgreSQL ODBC driver could not be
loaded due to system error code 126." followed by "Could not load the setup or
translator library".

Without very much hope, trying ODBCng rev 64 from
http://projects.commandprompt.com/public/odbcng/browser/binaries/mODBC_Installer.msi.
Setup is OK and <Test> button works. However trying to connect to the database
gives "General SQL error. [Microsoft][ODBC Driver Manager] Driver does not
support this function".

So far I have not tried enabling client logging or reconciling client activity
with server logs. Allowing that I'm a novice in this particular area I might
need help with these.

It seems to me that I have three possible options:

a)    Work back through every possible v8 and v7 driver version in case there's one
that works. I don't much like the idea of this since even if I found such a
beast I would probably be running an unqualified combination of server and
client software.

b)    Revert to a v7 server on the new hardware, with the appropriate driver. I
don't much like this one either since part of the reason I'm putting time into
this is to allow me to (finally) use replication.

c)    Trying to work out what is specific to this app that causes a failure.
However since most queries in the suite are scripted this could still leave
timebombs in the syste,

The other options- investigating mySQL or Oracle- are quite simply too hideous
to contemplate.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
"Joshua D. Drake"
Date:
> Without very much hope, trying ODBCng rev 64 from
> http://projects.commandprompt.com/public/odbcng/browser/binaries/mODBC_Installer.msi.
> Setup is OK and <Test> button works. However trying to connect to the database
> gives "General SQL error. [Microsoft][ODBC Driver Manager] Driver does not
> support this function".


I seriously doubt that ODBCng is going to work for you. I didn't see
that you are running 7.x of PostgreSQL. We explicitly do NOT support any
version less then 8.x of PostgreSQL.

Sincerely,

Joshua D. Drkae


>


--

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/



Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
> > Without very much hope, trying ODBCng rev 64 from
> > http://projects.commandprompt.com/public/odbcng/browser/binaries/mODBC_Installer.msi.
> > Setup is OK and <Test> button works. However trying to connect to the
> > database gives "General SQL error. [Microsoft][ODBC Driver Manager] Driver
> > does not support this function".
>
> I seriously doubt that ODBCng is going to work for you. I didn't see
> that you are running 7.x of PostgreSQL. We explicitly do NOT support any
> version less then 8.x of PostgreSQL.

I am *NOT* running v7, except insofar as I'm trying to migrate from a v7 server
to v8. After the work I put into describing what client drivers I was using,
which server I was testing against and what happened I really think that you
could have read my posting without jumping to conclusions.

Where I tested drivers against v7 it was purely to test that the basic
installation was complete, and in most cases it was a known-good v7 driver
against a known-good v7 server. You'd be entitled to criticise me if I hadn't
checked whether my test system still had working ODBC and I'd led everybody on a
wild goose chase as a result. Where I was cross-testing it was out of prurient
curiosity :-)

I suspect that both driver series- i.e. "official" ODBC and ODBCng- are up
against problems with the version of the ODBC DLLs they are expecting.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
"Joshua D. Drake"
Date:
Mark Morgan Lloyd wrote:
>>> Without very much hope, trying ODBCng rev 64 from
>>> http://projects.commandprompt.com/public/odbcng/browser/binaries/mODBC_Installer.msi.
>>> Setup is OK and <Test> button works. However trying to connect to the
>>> database gives "General SQL error. [Microsoft][ODBC Driver Manager] Driver
>>> does not support this function".
>> I seriously doubt that ODBCng is going to work for you. I didn't see
>> that you are running 7.x of PostgreSQL. We explicitly do NOT support any
>> version less then 8.x of PostgreSQL.
>
> I am *NOT* running v7, except insofar as I'm trying to migrate from a v7 server
> to v8. After the work I put into describing what client drivers I was using,
> which server I was testing against and what happened I really think that you
> could have read my posting without jumping to conclusions.
>
> Where I tested drivers against v7 it was purely to test that the basic
> installation was complete, and in most cases it was a known-good v7 driver
> against a known-good v7 server. You'd be entitled to criticise me if I hadn't
> checked whether my test system still had working ODBC and I'd led everybody on a
> wild goose chase as a result. Where I was cross-testing it was out of prurient
> curiosity :-)


Nobody is criticizing you ...

Joshua D. Drake


>
> I suspect that both driver series- i.e. "official" ODBC and ODBCng- are up
> against problems with the version of the ODBC DLLs they are expecting.
>


--

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/



Re: Latest ODBC driver?

From
Dave Page
Date:


On 30/8/06 17:32, "Mark Morgan Lloyd" <markMLl.pgsql-odbc@telemetry.co.uk>
wrote:

> I suspect that both driver series- i.e. "official" ODBC and ODBCng- are up
> against problems with the version of the ODBC DLLs they are expecting.

If that's the case, then it's the first time I recall it ever happening in 8
years or more on this list :-)

So, anyway, as one of many people who've most releases of the driver in
production for many years I'm keen to see this resolved, so let's try some
slightly more focused testing.

The latest driver code from Inoue-san is almost certainly the best bet of
all - it is based on the 07 series which you have working, and for the most
part only adds new functionality over that series. It's also the only branch
anyone will fix bugs in. As you mention you are running a BDE based app you
absolutely need to run an ANSI build of the driver, so...

1) On a test system, uninstall any PostgreSQL drivers to be safe.

2) Download the ANSI driver from
http://www.geocities.jp/inocchichichi/psqlodbc/index.html. Unpack into your
system32 directory.

3) Register the driver by copying and pasting the following into
psqlodbc.reg (not including the ==== marks), then importing it into the
registry using regedit:

============================================================
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI]

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
"PostgreSQL ANSI"="Installed"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL]
"APILevel"="1"
"ConnectFunctions"="YYN"
"Driver"="PSQLODBCA.DLL"
"DriverODBCVer"="03.00"
"FileUsage"="0"
"Setup"="PSQLODBCA.DLL"
"SQLLevel"="1"
"UsageCount"=dword:00000001
============================================================

I don't recall if NT4 has Regedit - if not, you may have to manually add the
values using regedt32.exe.

4) Check the driver appears in the driver manager and that the version shown
matches the DLLs.

5) Setup a DSN pointing to your 7.x server.

6) Start your app, and check it works. If you find a failure, close the app,
enable MyLog in the DSN, then restart the app and reproduce the failure in
the most minimal way you can (to keep the log small). Post the log for
review.

7) If that works, try the 8.1 server. Do the previous log dance if you find
a failure.

Once we have a log of the actual failure, we should be able to see what is
going wrong.

The installation pain above is only temporary btw. When we release, the
installer will include both driver builds.

Regards, Dave.


Re: Latest ODBC driver?

From
Hiroshi Inoue
Date:
Dave Page wrote:
>
>
>
>> -----Original Message-----
>> From: Hiroshi Inoue [mailto:inoue@tpf.co.jp]
>> Sent: 30 August 2006 04:59
>> To: Dave Page
>> Cc: Stijn Vanroye; pgsql-odbc@postgresql.org
>> Subject: Re: [ODBC] Latest ODBC driver?
>>
>> Dave Page wrote:
>>
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: pgsql-odbc-owner@postgresql.org
>>>> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Stijn Vanroye
>>>> Sent: 29 August 2006 12:50
>>>> To: pgsql-odbc@postgresql.org
>>>> Subject: Re: [ODBC] Latest ODBC driver?
>>>>
>>>> 1. Is there any indication to when the 08.02 will be
>>>> offically released as stable?
>>>>
>>> As soon as Hiroshi Inoue let's me know that he's committed the
>>> outstanding patches he was polishing off. I hope sometime this week.
>>>
>> I've committed most of my local source. I'm waiting for some response
>> about VPN problem but got no response. Anyway I would commit the rest
>> of changes tonight.
>>
>
> OK thanks - please let me know when you're work is done.
>

Done.
Thanks.

regards,
Hiroshi Inoue

Re: Latest ODBC driver?

From
Stijn Vanroye
Date:
Dave Page schreef:
> The latest driver code from Inoue-san is almost certainly the best bet of
> all ...
That's true for me anyway ;-)

> As you mention you are running a BDE based app you
> absolutely need to run an ANSI build of the driver, so...
Just a thought: Mark, are you using the actual BDE engine itself
(TTable, TQuery and such), or are you using the ADO components
(TADOConnection in combination with e.g. a TADOQuery or TADODataSet)?

We have been working with the combo ADO components and ODBC Unicode
driver for quite some time here, and it has always worked. (We started
using this combination somewhere around postgres version 7.x-ish)
Only with the release of the 8.x version of postgres and the new driver
archticture attempt, we have had some problems conscerning the blob/lo
datatype, but with the latest version of the ODBC (08.02.x) those
problems seem to have been solved.

The point is that you can work with Delphi/ADO components *and* use the
Unicode driver. The only extra we did was SET CLIENT_ENCODING TO
'latin1' as extra parameter.

Regards,

Stijn

www.easytowork.nl
www.xillion.nl

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Stijn Vanroye wrote:

> Just a thought: Mark, are you using the actual BDE engine itself
> (TTable, TQuery and such), or are you using the ADO components
> (TADOConnection in combination with e.g. a TADOQuery or TADODataSet)?

Stijn, thanks for that. I'm using pukka BDE in all cases- in general a TQuery
with custom query text constructed at runtime. I also admit that I'm using D3,
and that we are far more interested in getting the apps running using Lazarus on
Linux than we are in paying extortionate upgrade prices for dubious
enhancements.

> We have been working with the combo ADO components and ODBC Unicode
> driver for quite some time here, and it has always worked. (We started
> using this combination somewhere around postgres version 7.x-ish)
> Only with the release of the 8.x version of postgres and the new driver
> archticture attempt, we have had some problems conscerning the blob/lo
> datatype, but with the latest version of the ODBC (08.02.x) those
> problems seem to have been solved.
>
> The point is that you can work with Delphi/ADO components *and* use the
> Unicode driver. The only extra we did was SET CLIENT_ENCODING TO
> 'latin1' as extra parameter.

Noted for future reference :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> 1) On a test system, uninstall any PostgreSQL drivers to be safe.

Done. There are no DLLs etc. *psql*.* remaining on the machine.

> 2) Download the ANSI driver from
> http://www.geocities.jp/inocchichichi/psqlodbc/index.html. Unpack into your
> system32 directory.

 81920 Aug 31 09:51 pgxalib.dll
446464 Aug 31 09:51 psqlodbca.dll

> 3) Register the driver by copying and pasting the following into
> psqlodbc.reg (not including the ==== marks), then importing it into the
> registry using regedit:

Done. Regedit displayed its confirmation dialogue.

> 4) Check the driver appears in the driver manager and that the version shown
> matches the DLLs.

ODBC drivers in the control panel include reference to "PostgreSQL ANSI", but
there is no version number, company or file info.

> 5) Setup a DSN pointing to your 7.x server.

Attempting to select the driver gives "The setup routines for the PostgreSQL
ANSI ODBC driver could not be found. Please reinstall the driver" follwed by a
dialogue titled "Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed"
containing "Component not found in the registry".

I can confirm that psqlodbca.dll is in c:\winnt_4\system32, as is pgxalib.dll.
I've checked the registry values and they appear to be as you specified.

Remaining steps omitted for obvious reasons :-(

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Dave Page
Date:


On 31/8/06 22:19, "Mark Morgan Lloyd" <markMLl.pgsql-odbc@telemetry.co.uk>
wrote:

> Attempting to select the driver gives "The setup routines for the PostgreSQL
> ANSI ODBC driver could not be found. Please reinstall the driver" follwed by a
> dialogue titled "Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed"
> containing "Component not found in the registry".
>
> I can confirm that psqlodbca.dll is in c:\winnt_4\system32, as is pgxalib.dll.
> I've checked the registry values and they appear to be as you specified.
>
> Remaining steps omitted for obvious reasons :-(

Oh, I wonder if Hiroshi linked that DLL against libpq et al. Can't really
check that on my Mac!

OK, now I've built an official release it'd be much more sensible to use
that anyway. Please delete the 2 files and the registry entries that were
added, install the new release, and begin testing against your existing 7.x
server.

Regards, Dave


Re: Latest ODBC driver?

From
Stijn Vanroye
Date:
Mark Morgan Lloyd schreef:

> Stijn Vanroye wrote:
>
> > Just a thought: Mark, are you using the actual BDE engine itself
> > (TTable, TQuery and such), or are you using the ADO components
> > (TADOConnection in combination with e.g. a TADOQuery or
> TADODataSet)?
>
> Stijn, thanks for that. I'm using pukka BDE in all cases- in
> general a TQuery with custom query text constructed at
> runtime. I also admit that I'm using D3, and that we are far
> more interested in getting the apps running using Lazarus on
> Linux than we are in paying extortionate upgrade prices for
> dubious enhancements.

Pukka BDE is unknown to me, but on the case of behaviour and usage within Delphi there's no siginificant difference
betweena Tquery and a Tadoquery. Also linking it to db-aware components, reporting tools etc. is no problem. I believe
thatyou can quite easily replace your Tquery objects with TADOQuery objects, without any major changes. I build almost
everyquery at runtime... 

Just my 2 cents (a bit off-topic):
D3? Hmm.. I only started in D4 myself, and got to D7 now :) But I can imagine that the BDE and other data components
area bit outdated in D3. I'm guessing that with the frase "extortionate upgrade prices for dubious enhancements" you
meanupgrading to a more up-to-date delphi version, and not having certainty that your problem would be solved?
Dependingon how the situation for which you are developping is changing (as I believe you are building mostly internal
appsfor NT4 systems), you will be forced to change your toolkit sooner or later. Best is to keep a close eye on that
andbe prepared for this kind of change. Conscider that porting your application(s) could take a lot of time. Looking
fromD3 to the most recent versions, there have been quite some changes. How far Lazarus can take you in this is unknown
tome, since I have never looked into it (sounds interesting though) ;-) 

Regards and good luck,


Stijn.


Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> OK, now I've built an official release it'd be much more sensible to use
> that anyway. Please delete the 2 files and the registry entries that were
> added, install the new release, and begin testing against your existing 7.x
> server.

Got

ftp://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc-08_02_0100.zip

Unzipped, 2287104 Aug 31 09:31 psqlodbc.msi

Installed (as Administrator), Control Panel shows version as 8.02.0100.

Added DSN (as myself albeit with temporary admin privileges) for v7 server with
ANSI driver... get dialogue (no title) "The setup routines for the PostgreSQL
ANSI ODBC driver could not be loaded due to system error 126." followed by
"Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed" "Could not load
the setup or translator library".

Get the same attemping to use the Unicode driver. Attempting as Administrator
gets the same behaviour.

Uninstall (from the command line) and replace with the 7.02.001 driver which I
am using on other machines. Test against suspect app and it works, memory usage
>1Mb.

ODBC DLLs version 3.50.33.8.

I'd just like to add that I very much appreciate your help and suggestions.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Dave Page
Date:


On 1/9/06 10:46, "Mark Morgan Lloyd" <markMLl.pgsql-odbc@telemetry.co.uk>
wrote:

> Dave Page wrote:
>
>> OK, now I've built an official release it'd be much more sensible to use
>> that anyway. Please delete the 2 files and the registry entries that were
>> added, install the new release, and begin testing against your existing 7.x
>> server.
>
> Got
>
> ftp://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc-08_02_0100.zip
>
> Unzipped, 2287104 Aug 31 09:31 psqlodbc.msi
>
> Installed (as Administrator), Control Panel shows version as 8.02.0100.
>
> Added DSN (as myself albeit with temporary admin privileges) for v7 server
> with
> ANSI driver... get dialogue (no title) "The setup routines for the PostgreSQL
> ANSI ODBC driver could not be loaded due to system error 126." followed by
> "Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed" "Could not load
> the setup or translator library".
>
> Get the same attemping to use the Unicode driver. Attempting as Administrator
> gets the same behaviour.

OK, that most likely means there's a dependency missing on NT. I saw a
similar report about 98SE earlier. Can you get your hands on a copy of
Microsoft's depends.exe program to see what it cannot find? It comes with
Visual Studio, and I *think* the platform SDK (check first though - it's a
large download)
>
> I'd just like to add that I very much appreciate your help and suggestions.

You're welcome - it's a shame you need them though.

Regards, Dave


Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Dave Page wrote:

> OK, that most likely means there's a dependency missing on NT. I saw a
> similar report about 98SE earlier. Can you get your hands on a copy of
> Microsoft's depends.exe program to see what it cannot find? It comes with
> Visual Studio, and I *think* the platform SDK (check first though - it's a
> large download)
> >
> > I'd just like to add that I very much appreciate your help and suggestions.
>
> You're welcome - it's a shame you need them though.

I'll work on that, but I've got to clear some other jobs first. In retrospect
I'm kicking myself- if I'd tackled the upgrade a few weeks earlier it would have
been a problem spotted and perhaps fixed a few weeks earlier. In the worst case
I'll be able to continue running v7 until I've junked the BDE, but if I were a
new user and found this sort of glitch...

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
George Weaver
Date:
----- Original Message -----
From: "Dave Page" <dpage@vale-housing.co.uk>
To: "Mark Morgan Lloyd" <markMLl.pgsql-odbc@telemetry.co.uk>;
<pgsql-odbc@postgresql.org>
Sent: Friday, September 01, 2006 8:02 AM
Subject: Re: [ODBC] Latest ODBC driver?


> OK, that most likely means there's a dependency missing on NT. I saw a
> similar report about 98SE earlier. Can you get your hands on a copy of
> Microsoft's depends.exe program to see what it cannot find? It comes with
> Visual Studio, and I *think* the platform SDK (check first though - it's a
> large download)

You can download depends.exe from http://www.dependencywalker.com/.

Regards,
George



Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
George Weaver wrote:

> You can download depends.exe from http://www.dependencywalker.com/.

Saves me some legwork- thanks :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Re: Latest ODBC driver?

From
Hiroshi Inoue
Date:
Dave Page wrote:
>
> On 1/9/06 10:46, "Mark Morgan Lloyd" <markMLl.pgsql-odbc@telemetry.co.uk>
> wrote:
>
>
>> Dave Page wrote:
>>
>>
>>> OK, now I've built an official release it'd be much more sensible to use
>>> that anyway. Please delete the 2 files and the registry entries that were
>>> added, install the new release, and begin testing against your existing 7.x
>>> server.
>>>
>> Got
>>
>> ftp://ftp.postgresql.org/pub/odbc/versions/msi/psqlodbc-08_02_0100.zip
>>
>> Unzipped, 2287104 Aug 31 09:31 psqlodbc.msi
>>
>> Installed (as Administrator), Control Panel shows version as 8.02.0100.
>>
>> Added DSN (as myself albeit with temporary admin privileges) for v7 server
>> with
>> ANSI driver... get dialogue (no title) "The setup routines for the PostgreSQL
>> ANSI ODBC driver could not be loaded due to system error 126." followed by
>> "Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed" "Could not load
>> the setup or translator library".
>>
>> Get the same attemping to use the Unicode driver. Attempting as Administrator
>> gets the same behaviour.
>>
>
> OK, that most likely means there's a dependency missing on NT. I saw a
> similar report about 98SE earlier.

I've suspected the MSDTC support. Though I'm not sure, delay loading of
OLEHLP.dll may solve the problem.
Please try the dlls at
  http://www.geocities.jp/inocchichichi/psqlodbc/index.html .

regards,
Hiroshi Inoue

Re: Latest ODBC driver?

From
Mark Morgan Lloyd
Date:
Hiroshi Inoue wrote:

> I've suspected the MSDTC support. Though I'm not sure, delay loading of
> OLEHLP.dll may solve the problem.
> Please try the dlls at
>   http://www.geocities.jp/inocchichichi/psqlodbc/index.html .

My apologies for the delay responding. I've updated the ANSI DLL on an installed
version of 8.02.0100 to 8.02.0101 and this allows a DSN to be created.
Unfortunately attempting to connect to the database with any program (not just
the one that is known to give problems) fails with an authentication error. This
applies when attempting to connect to either the v7 or v8 server.

I will fill this in with more detail as soon as I am able.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]