----- Original Message -----
From: Alan McDonald
To: IBObjects@yahoogroups.com
Sent: Saturday, February 28, 2004 10:31 AM
Subject: RE: [IBO] TIB_DataPump
> Hi Alan.
> I have two databases with identical structure.
> Starting with some identical data eg: People who works there,
> with their data.
> Now in a remote office people could insert or modify that data.
> This changes must be transferred into the other database which
> reside in the central office.
> So I need an insert/update datapump.
> In metacode:
>
> //*
> If exists PK then
> update
> else
> insert
> //*
> Thanks for the help.
> Ciao
> Arnaldo
Yes, so you are saying that the update works (which means the PK is found in
the destination db) but the insert fails with the PK violation message.
Alan, thanks for Your time...
if i use a TIB_DSQL with ( in metacode )...
update table set afield= :afield, bfield= :bfield
where pkfield = :pkfield
Works.
but I nees also
insert into table pkfield, afield, bfield
values( :pkfield, :afield, :bfield )
this only if dont find a primary key...
I know my english is bad and the matters is obscure...
You are inferring that the message doesn't make sense but
do you have two PK constraints set on the target table which you have
forgotten about?
Maybe we should se more code behind this pseudo code you have?
Alan
Ciao
Arnaldo
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________ http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !