SQL way of getting last recID
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Mar 21 15:39:47 CST 2004
On 3/21/04 3:16 PM, "James Kleinschmidt" <jkleins at shentel.net> wrote:
Hi James,
> Also I think I am just not getting my mind around this problem
> correctly. It seems like it is so commonly encountered situation that
> there must be an answer I am missing. My problem is easy. I have a list
> with all the users in a group. When I click to edit one I get the
> individual record and fill in the edit fields. When I want to add a new
> one I populated the fields and on "Save" I insert the record into the
> database. The thing I want to do is just keep contact with that record
> so if I want to edit it anymore I can. I can't seem to find a way to
> get the recID of the last added record without searching by some other
> factors. It seems like such a common problem surely someone has a
> solution that I am just missing, or a different way of approaching
> this?
You have some cursor from which you display list of users?
I think you have it.
Then you can do instead of INSERT command
Just cursor.AddRecord().
AddRecord() will add new record at the end of records in cursor.
To be able see its recID you need
SELECT RecID ........
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list