On Friday 30 June 2006 09:25, Zlatko Matić wrote:
> I have big problem with displaying results from a query, by using Postgres
> 8.1.X, TPQConnection, TSQLQuery and TSQLTransaction. I think that something
> is very wrong with SqlDB components...Values in some columns are not
> displayed at all, or are displayed incorrectly (zero insted of actual
> numerical value, the same datetime in all timestamp fields etc., empty
> cells in some varchar columns etc.). I tried with different queries and it
> is always the same: values in some columns are displayed correctly, while
> other columns are empty or with wrong values. It is not related to field's
> type, because some fields are correctly displayed while others are not,
> although having the same type. I tested also on the other computer and
> there was the same result. Win XP SP2, PostgreSQL 8.1.2 and PostgreSQL
> 8.1.4; encoding: WIN1250, recent Lazarus snapshots, as well as with current
> official Windows binary. Just for record, all the queries are previously
> tested on pgAdmin and MS Access front-end and are working without any
> problems on those platforms...
>
> Do you have any idea?
>
> P.S. Is there anybody successfully using Lazarus with Postgres 8.1.X ? I
> would really like to know if it is possible to use Lazarus seriously with
> Postgres...
>
> Zlatko
I'm using Postgres daily I have small issues that I have programmed around but 
nothing like you are experiencing.  

Here is what I do to debug:

I turn on logging on the Postgres side.  The logs provide a detail description 
of what has been sent from FPC to Postgres.  This has helped me in many 
situations.  Like I had a issue with quotedstr() for a very long time until I 
checked what was being sent to Postgres only to discover that the I was 
sending the wrong number of quotes.  If I think I'm have trouble with SQLdb I 
create an example form and see what happens.  

One thing I do is not use a datamodule.  I created simple routines to update 
the connection, query, transaction, and datasource.  Other than that I follow  
the SQLdb examples.  

John

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to