main logo
Subject: Re: [NF] What's the equivalent of VFP's NEWID() function in MySQL?
Author: "Leland F. Jackson, CPA"
Posted: 2003/06/12 19:00:00
 
View Entire Thread
New Search


Hi Michael,

Make a selection against the table holding the parent keys to grab the =
key number of the parent against which you want to post child records. =
Then insert the child records with the selected parent key.

LelandJ
----- Original Message -----=20
From: vfpmcp .AT. mbsoftwaresolutions .D.OT com=20
To: profox@leafe.com=20
Sent: Thursday, June 12, 2003 7:00 PM
Subject: [NF] What's the equivalent of VFP's NEWID() function in =
MySQL?


Attn MySQL experts,

How do I get the same functionality for generating unique keys with a =
MySQL back end (specifically, in the scenario where you need to know the =
parent key so that you can write the corresponding key in the child =
tables for linking records)?

I saw a function to determine the next key in a MySQL database, but my =
concern is that the operation gets that key (but only gets...doesn't =
increment), but by the time my user finally saves the record, that key =
value is not accurate (unless there's some way to lock the record, but I =
don't think so in MySQL)?

TIA,
--Michael

[excessive quoting removed by server]






 
©2003 Leland F. Jackson, CPA
<-- Prior Message New Search Next Message -->