[Mono-list] Postgresql client on Windows

Jaroslaw Kowalski jarek@atm.com.pl
Thu, 21 Nov 2002 15:33:01 +0100


One more thing: I am SURE that the connection to server (at least a part of
it) has succeeded.

The problem occured when PQgetvalue() was iterating over a list of types
(select ... from pg_types ...). It actually succeeded for 10 rows (I could
see type names in the debugger) or so but failed on 11th one.

Very strange.

Sorry, but I cannot see my code right now, so this is all I remember. But
"new PostgreSqlConnection()" is all that's needed to reproduce it on my
machine.

Jarek

----- Original Message -----
From: "Jaroslaw Kowalski" <jarek@atm.com.pl>
To: "Daniel Morgan" <danmorg@sc.rr.com>; <mono-list@ximian.com>
Sent: Thursday, November 21, 2002 3:27 PM
Subject: Re: [Mono-list] Postgresql client on Windows


> All bad things happened inside simple
>
> new PostgreSqlConnection()
>
> where it was building a list of supported data types by executing some
query
> on pg_types, I suppose.
>
> BTW. Any chance to get a managed provider for PostgreSQL?
>
> Jarek
>
> ----- Original Message -----
> From: "Daniel Morgan" <danmorg@sc.rr.com>
> To: "Jaroslaw Kowalski" <jarek@atm.com.pl>; <mono-list@ximian.com>
> Sent: Thursday, November 21, 2002 2:29 PM
> Subject: RE: [Mono-list] Postgresql client on Windows
>
>
> > Here is the postgresql packages:
> > http://www.cygwin.com/packages/postgresql/
> >
> > What kind of data was you trying to get from the database?
> > Do you have some sample code, as in a test cast?
> > Was the SQL valid?
> > Is the postgresql server up and running (postmaster)?
> > Is the postgresql server on the running on the same computer as your
> client?
> >
> > By the way, the postgresql client was designed to work with Mono.  If on
> > Windows, you will need Cygwin
> > from http://www.cygwin.com/
> >
> > The web page
> > http://www.go-mono.com/postgresql.html
> > mentions how to set up the postgresql server to work with mono.
> >
> > -----Original Message-----
> > From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
> > Behalf Of Jaroslaw Kowalski
> > Sent: Thursday, November 21, 2002 4:53 AM
> > To: mono-list@ximian.com
> > Subject: [Mono-list] Postgresql client on Windows
> >
> >
> > Hi!
> >
> > Yesterday I've tried to compile Postgresql client on Windows using
VS.NET.
> > It compiled fine, but somehow it failed to work.
> >
> > What I was trying to do was to connect to 7.1.3 server on Linux from
> Windows
> > with PQ.DLL library from 7.2.1 version, because I couldn't find old
PQ.DLL
> > library, maybe that's the reason why it fails. Upgrading DB is not an
> option
> > right now.
> >
> > With debugger I found that I was getting NullPointerException in
> > PostgresLibrary.PQexec() and PostgresLibrary.PQgetvalue().
> >
> > I observed that by adding SetLastError=false to DllImport attribute on
> > PQexec function I could get rid of NullPointerException on it.
> PQgetvalue()
> > still fails, however.
> >
> > I would appreciate if anyone could send me/point me to a binary of
pq.dll
> > from 7.1.3 version plus any cygwin dependencies of it. Do you have any
> > suggestions beside aligning versions?
> >
> > Jarek
> >
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
> >
>