SQL question

Andre Garzia soapdog at mac.com
Sun Jul 11 16:07:14 EDT 2004


Hershel,

since you're doing the INSERTS you have access to the inserted data, 
can't your refine your SELECT query so that you SELECT WHERE and put 
all the inserted data as refinements, this way you'll retrieve the 
correct record. Thats what I use here.

Cheers
andre


On Jul 11, 2004, at 4:48 PM, hershbp at verizon.net wrote:

> HI ,
> How do I "INSERT" A SQL statement and return some of  the record or 
> field info  immediately ?
> I'll try to elaborate. A database app. running many clients, I create 
> a new record and want to get the primary key of that newly created 
> record. If I'll do an "INSERT" and then go the last record via 
> "SELECT" then between the INSERT and the SELECT somebody else from a 
> different location can insert a new record then when I do the select 
> to get the last as mentioned above I'll get the wrong pk. How do I 
> overcome that ?
> Thanks , Hershel.
>
-- 
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list