Обсуждение: Postgresql odbc and Visual studio 2005 .net 2.0
Hi all,
I just got word from MS and this is what they said about the problems some of us are experiencing:
Hi Paul,
It appears that there are problems with this particular ODBC driver. It tells us that the default catalog is "\0\0" (taken from the IDbConnection.Database property) so we pass this as a catalog restriction to enumerate tables. This works, however the rows returned provide a catalog of NULL. This is inconsistent behavior, and when we then ask our cache to select objects with the catalog restriction "\0\0" it finds none because all objects in the cache have a NULL catalog.
There is no workaround for this issue, unfortunately. The only solution is for the ODBC driver to be fixed.
Thanks,
Stephen Provine
VS Data Development Team
Is it possible to change the behavior of the ODBC driver?
Kind Regards,
Paul
On 11/23/05, Leendert Paul Diterwich <paulditerwich@gmail.com> wrote: > > > Hi all, > > > > I just got word from MS and this is what they said about the problems some > of us are experiencing: > > > > Hi Paul, > > It appears that there are problems with this particular ODBC driver. It > tells us that the default catalog is "\0\0" (taken from the > IDbConnection.Database property) so we pass this as a catalog restriction to > enumerate tables. This works, however the rows returned provide a catalog of > NULL. This is inconsistent behavior, and when we then ask our cache to > select objects with the catalog restriction "\0\0" it finds none because all > objects in the cache have a NULL catalog. > > There is no workaround for this issue, unfortunately. The only solution is > for the ODBC driver to be fixed. > > Thanks, > Stephen Provine > VS Data Development Team > > > > Is it possible to change the behavior of the ODBC driver? > > > > Kind Regards, > > > > Paul about your problem with the odbc... sounds weird i used the vs.net (not 2005 i don't remember de version, it was a year ago or maybe two :) and i use the odbc and odbc .net data provider without problems... maybe a bug new in vs.net 2005 or maybe a new "behaviour", who knows... have you tried the npgsql (.Net Data Provider for Pgsql), you can find it in pgfoundry.org -- Atentamente, Jaime Casanova (DBA: DataBase Aniquilator ;)
From: Leendert Paul Diterwich [mailto:paulditerwich@gmail.com]
Sent: 23 November 2005 16:53
To: pgsql-odbc@postgresql.org
Cc: Dave Page
Subject: Postgresql odbc and Visual studio 2005 .net 2.0Hi all,
I just got word from MS and this is what they said about the problems some of us are experiencing:
Hi Paul,
It appears that there are problems with this particular ODBC driver. It tells us that the default catalog is "\0\0" (taken from the IDbConnection.Database property) so we pass this as a catalog restriction to enumerate tables. This works, however the rows returned provide a catalog of NULL. This is inconsistent behavior, and when we then ask our cache to select objects with the catalog restriction "\0\0" it finds none because all objects in the cache have a NULL catalog.
There is no workaround for this issue, unfortunately. The only solution is for the ODBC driver to be fixed.
Thanks,
Stephen Provine
VS Data Development Team
Is it possible to change the behavior of the ODBC driver?
Certainly, if we can track down the actual bug. The problem is, afaik, there is no way to ask an ODBC driver what the default catalog is, so I'm not sure where they're getting this info from. If they're actually querying the /current/ catalog immediately following a connect, then they're using SQLGetConnectAttr, in which I have just commited a fix which meant that the wrong result length was returned. That could conceivably have caused this problem.
I can email a couple of DLL's to test if you like?
Regards, Dave.