What database?  For MS SQL:

      set nocount on
      Insert into ....
      Select scope_identity() as myID
      Set nocount on

Then:
    <cfset key = qryName.myID />

Andy
  -----Original Message-----
  From: Steve Kahn [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, September 21, 2004 10:12 AM
  To: CF-Talk
  Subject: Creating a unique ID from a Query Insert for use in an Update

  I have a login that I want to capture user stats with. However, I am having
trouble identifing the QUERY INSERT with the UPDATE. In this case I am
attempting to identify the userID and pass it to the Update. This is probably
not the best method - any suggestions.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to