I don't know about MySQL, but post the code you used..
Taco Fleur Blog http://www.tacofleur.com/index/blog/ Methodology http://www.tacofleur.com/index/methodology/ Tell me and I will forget Show me and I will remember Teach me and I will learn > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mark M > Sent: Thursday, 12 February 2004 12:46 PM > To: CFAussie Mailing List > Subject: [cfaussie] Re: Whats your Primary Key? > > > I just tried this in mySQL, and could not get it to work. > > Maybe just an MSSQL thing? > ------------------------------------------------------------------ > [EMAIL PROTECTED] > ICQ: 3094740 > Safe From Bees > [ www.safefrombees.com ] > > > Quoting Brett Payne-Rhodes <[EMAIL PROTECTED]>: > > > Great! I really didn't think you could. I'll have to try it out... > > > > Many thanks, > > > > Brett > > B) > > > > > > Taco Fleur wrote: > > > Yup... > > > > > > Taco Fleur > > > Blog http://www.tacofleur.com/index/blog/ > > > Methodology http://www.tacofleur.com/index/methodology/ > > > > > > Tell me and I will forget > > > Show me and I will remember > > > Teach me and I will learn > > > > > > > > > > > >>-----Original Message----- > > >>From: [EMAIL PROTECTED] > > >>[mailto:[EMAIL PROTECTED] On Behalf > > >>Of Brett Payne-Rhodes > > >>Sent: Thursday, 12 February 2004 12:21 PM > > >>To: CFAussie Mailing List > > >>Subject: [cfaussie] Re: Whats your Primary Key? > > >> > > >> > > >>Can you do an Insert and a Select in a single cfquery? > > >> > > >>B) > > >> > > >>Taco Fleur wrote: > > >> > > >>>Just to confirm, are you saying that any of the following > > >> > > >>are another > > >> > > >>>trip to the db? > > >>> > > >>><cfquery ....> > > >>>INSERT INTO .... > > >>> > > >>>SELECT @@IDENTITY AS myKey > > >>></cfquery ....> > > >>> > > >>>CREATE PROCEDURE > > >>>( ............ > > >>>INSERT INTO .... > > >>> > > >>>SELECT @@IDENTITY AS myKey > > >>> > > >>> > > >>> > > >>> > > >>>Taco Fleur > > >>>Blog http://www.tacofleur.com/index/blog/ > > >>>Methodology http://www.tacofleur.com/index/methodology/ > > >>> > > >>>Tell me and I will forget > > >>>Show me and I will remember > > >>>Teach me and I will learn > > >>> > > >>> > > >>> > > >>> > > >>>>-----Original Message----- > > >>>>From: [EMAIL PROTECTED] > > >>>>[mailto:[EMAIL PROTECTED] On Behalf > > >>>>Of Brett Payne-Rhodes > > >>>>Sent: Thursday, 12 February 2004 12:03 PM > > >>>>To: CFAussie Mailing List > > >>>>Subject: [cfaussie] Re: Whats your Primary Key? > > >>>> > > >>>> > > >>>>@@IDENTITY may solve the 'lock' issue but it is still > > >>> > > >>another trip to > > >> > > >>>>the database to actually retrieve it. Personally I don't have > > >>>>a problem > > >>>>with doing it but let's be clear about what is and is not true. > > >>>> > > >>>>And thanks to Tim Lucas who recently brought to light > the ability > > >>>>to use @@IDENTITY in mySQL v4+. > > >>>> > > >>>>Brett > > >>>>B) > > >>>> > > >>>>Taco Fleur wrote: > > >>>> > > >>>> > > >>>>>This article is 5 years old.. > > >>>>> > > >>>>>"The problem with these is that finding the PK value > of a newly > > >>>>>inserted record requires another trip to the server and the > > >>>> > > >>>>DB -- and > > >>>> > > >>>> > > >>>>>a lock on the database file while the DB determines > the last ID > > >>>>>inserted." > > >>>>> > > >>>>>This is not true for MS SQL, you simple use @@IDENTITY or > > >>>>>SCOPE_IDENTITY > > >>>>> > > >>>>> > > >>>>>Taco Fleur > > >>>>>Blog http://www.tacofleur.com/index/blog/ > > >>>>>Methodology http://www.tacofleur.com/index/methodology/ > > >>>>> > > >>>>>Tell me and I will forget > > >>>>>Show me and I will remember > > >>>>>Teach me and I will learn > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>>>-----Original Message----- > > >>>>>>From: [EMAIL PROTECTED] > > >>>>>>[mailto:[EMAIL PROTECTED] On > Behalf Of > > >>>>>>Yorke Hinds > > >>>>>>Sent: Thursday, 12 February 2004 9:57 AM > > >>>>>>To: CFAussie Mailing List > > >>>>>>Subject: [cfaussie] Re: Whats your Primary Key? > > >>>>>> > > >>>>>> > > >>>>>>I am using SQL Server. > > >>>>>> > > >>>>>>In 1999 Hal Helms wrote a brief article on the subject - > > >>>>> > > > >>>>>http://www.halhelms.com/index.cfm?fuseaction=newsletters.aug1999 > > >>>>> > > >>>>>Any comments regaring Hals Article? > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>>--- > > >>>>>You are currently subscribed to cfaussie as: > > >>>> > > >>>>[EMAIL PROTECTED] To > > >>>> > > >>>> > > >>>>>unsubscribe send a blank email to > > >>>>>[EMAIL PROTECTED] > > >>>>> > > >>>>>MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > >>>>>http://www.mxdu.com/ + 24-25 February, 2004 > > >>>>> > > >>>>> > > >>>>>--- > > >>>>>You are currently subscribed to cfaussie as: > [EMAIL PROTECTED] To > > >>>>>unsubscribe send a blank email to > > >>>>>[EMAIL PROTECTED] > > >>>>> > > >>>>>MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > >>>>>http://www.mxdu.com/ + 24-25 February, 2004 > > >>>>> > > >>>> > > >>>> > > >>>>-- > > >>>>Brett Payne-Rhodes > > >>>>Eaglehawk Computing > > >>>>t: +61 (0)8 9371-0471 > > >>>>f: +61 (0)8 9371-0470 > > >>>>m: +61 (0)414 371 047 > > >>>>e: [EMAIL PROTECTED] > > >>>>w: www.ehc.net.au > > >>>> > > >>>> > > >>>> > > >>>>--- > > >>>>You are currently subscribed to cfaussie as: > > >>>>[EMAIL PROTECTED] To unsubscribe send a blank email to > > >>>>[EMAIL PROTECTED] > > >>>> > > >>>>MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > >>> > > >>>http://www.mxdu.com/ + 24-25 February, 2004 > > >>> > > >>> > > >>>--- > > >>>You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To > > >>>unsubscribe send a blank email to > > >>>[EMAIL PROTECTED] > > >>> > > >>>MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > >>>http://www.mxdu.com/ + 24-25 February, 2004 > > >>> > > >> > > >> > > >>-- > > >>Brett Payne-Rhodes > > >>Eaglehawk Computing > > >>t: +61 (0)8 9371-0471 > > >>f: +61 (0)8 9371-0470 > > >>m: +61 (0)414 371 047 > > >>e: [EMAIL PROTECTED] > > >>w: www.ehc.net.au > > >> > > >> > > >> > > >>--- > > >>You are currently subscribed to cfaussie as: > > >>[EMAIL PROTECTED] To unsubscribe send a blank email to > > >>[EMAIL PROTECTED] > > >> > > >>MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > > > > > http://www.mxdu.com/ + 24-25 February, 2004 > > > > > > > > > --- > > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To > > > unsubscribe send a blank email to > > [EMAIL PROTECTED] > > > > > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > > http://www.mxdu.com/ + 24-25 February, 2004 > > > > > > > > > -- > > Brett Payne-Rhodes > > Eaglehawk Computing > > t: +61 (0)8 9371-0471 > > f: +61 (0)8 9371-0470 > > m: +61 (0)414 371 047 > > e: [EMAIL PROTECTED] > > w: www.ehc.net.au > > > > > > > > --- > > You are currently subscribed to cfaussie as: > [EMAIL PROTECTED] To > > unsubscribe send a blank email to > > [EMAIL PROTECTED] > > > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > http://www.mxdu.com/ + 24-25 February, 2004 > > > > > > > > --- > You are currently subscribed to cfaussie as: > [EMAIL PROTECTED] To unsubscribe send a blank email to > [EMAIL PROTECTED] > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
