Subject Re: [IBO] Finding the right record
Author Jason Wharton
Write a stored procedure that attempts the insert and then have it catch the
exception of a duplicate key violation and do the update. This way you don't
select any records to the client whatever, you only send the information to
the server once and it does the insert or update as appropriate.

I've mentioned this method many times over. I recommend you search the
archives for it.

In a support system I would like to design I'd put a link right in here for
you...

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Walter Araújo Franco" <warty@...>
To: "IBObjects" <ibobjects@yahoogroups.com>
Sent: Tuesday, August 21, 2001 7:11 PM
Subject: [IBO] Finding the right record


Hi,

A doubt about "how to develop",
With Paradox (argh), i used to do:
Table.setkey;
tablePK.value:=avalue;
if table.gotokey then table.edit
else table.insert;

With queries, i know that i have to use the "where" clause, but, if i have
to read a thousand of new and updated record, it won't make my database go
down? or slowly?
Or there's another way to locate the record in a faster time?
txs in advance....

[]'s

Walter A. Franco
SysMaker Sistemas
Poços de Caldas - MG
UIN 11.606.129


[Non-text portions of this message have been removed]





Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/