> > The query that causes the error is :
> >
> > ' prepare prepst2 (int,int,numeric,text,int,text,int) as update PROD
> > set mag=$1,cod=$2,pu=$3,den=$4,p_vinz=$5,um=$6,stoc_ini=$7 where '
> >
> > Which is incomplete...   It looks liek it wasn't able to detect the columns 
that
> > form the primary key.   This table has a PK made up of 3 columns.
>
> > Can sqldb handle multi-column primary keys ?
> Apparently it doesn't  :-(      or it doesn't work for postgres.

Indeed. Somewhere in the code there's a comment like: 'ToDo: Multiple
fields-indexes should be parsed here...'

> Replacing the 3-columns primary key   with a single-column primary key caused
> the problem to disappear.

Could you write a bug-report for it? Also mention that it should
generate an error, if something like this happens. Instead of sending
incomplete requests to the db-server.

Ok, I will .

As a temporary solution you can do:

sqlquery1.updatesql := 'update PROD set mag=$1,cod=$2,pu=$3,den=
$4,p_vinz=$5,um=$6,stoc_ini=$7 where ...';

But then complete, offcourse. That way it doesn't try to generate the
update-query automatically, but it uses the query that you provide.

I'll try this approach.

Many thanks for your help, Joost !


Cheers,
Adrian Maier

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

Reply via email to