If the column is an identity field that generates the next available primary key, you can use the "SELECT @@IDENTITY" SQL statement to return the primary key value of the row you just inserted. This may be difficult to do using VFP code. You may be forced to use SQL instead. This I am a little unclear of becuase I have only done this using ADO with VB.
Andy Ahrndt
>I'm having a little trouble with primary keys and remote view to SQL 7 server.
>
>If I have a parent table and I APPEND BLANK to the view I don't have a primary key yet because SQL hasn't generated the key yet. That means I can't tie in any child records. To compound the problem my view needs to be parameterized on the key. The irony is I can't requery my view to get the key because the parameter to the view is that key.
>
>If anyone knows what I'm talking about and can help, message me a soon as you can.
>
>thanks,
>
>Greg Moss
>
www.siteproposals.com