Isn't there a problem there with
> SELECT Max(ID) AS mid FROM Table_Name
in a busy database? As in somebody may have submitted another record in the
microsecond that elapsed between the post and the search of the ID?

Wouldn't it be better to
Select ID
>From Table_Name
Where BlahColumn Like "#content_just_submitted#"

(this works best where #content_just_submitted#" is a text field, or, add a
couple AND BlahColumn2 = "content2" AND Blah Column3 = ... ... ...


Stephen R. Cassady
Publisher, Spank! Youth Culture Online
http://www.spankmag.com
[EMAIL PROTECTED]





Date: Sat, 22 Jul 2000 16:45:09 -0700
From: "Mike Weaver" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: Newbie needs a little PRO help
Message-ID: <022c01bff436$df7102c0$31ba3dd0@main>

Thanks very much.  That was it!!!

Mike
----- Original Message -----
From: "Stewart, Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 22, 2000 2:26 PM
Subject: RE: Newbie needs a little PRO help


> If I understand you correctly, you need the "autonumber" that was just
> created when you inserted data into your db. If this is correct, try this:
>
> <cfquery name="name" datasource="datasource">
> SELECT Max(ID) AS mid FROM Table_Name
> </cfquery>
>
> Hope that helps...
>
> Mark
>
> -----Original Message-----
> From: Mike Weaver [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 22, 2000 7:20 PM
> To: [EMAIL PROTECTED]
> Subject: Newbie needs a little PRO help
>
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_01FC_01BFF3F8.AC1EC580
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> I am developing an application which is going pretty well.  I have =
> stumbled at a point where I need a query to generate the last entry in =
> an access database.  I need the last entry in the "auto number" field =
> that is generated each time you make an entry.  All assistance =
> appreciated.
>
> Mike

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to