On Mar 1, 2010, at 2:32 PM, John wrote: > I have need to access tables via views. The views are insert-able, and > update-able, etc.. But they lack a way to retrieve the last PK (current pk > after an insert). Accessing the tables directly violates the way the company > wants insert,update, etc.. to work. The views do all the work - getting the > info into the correct tables etc. So it is in my best interest to use the > views.
For new records, you'll have to cook up something like running an auxiliary query to get the key. IOW, after an insert, open the view again in a temp cursor, and then locate the record that matches your newly-added record. Get the PK from that, close the temp cursor, and then update your local cursor with the PK for the new record. -- Ed Leafe _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/5fe1c747-b856-40b6-a495-f14576bac...@leafe.com