>- see footer for list info -< Hi unfortunately mySQL doesnt do stored procs
there are workarounds that are really ugly involving the use of perl the best bet (for me) is to write a CFmodule that takes the params the stored proc would have and include it in the code whereever its needed Hope that helps Matt ----- Original Message ----- From: "Lee Fortnam" <[EMAIL PROTECTED]> To: "'Coldfusion Development'" <[email protected]>; "'database programming'" <[email protected]> Sent: Wednesday, June 22, 2005 11:48 PM Subject: [CF-Dev] First go at MySQL > >- see footer for list info -< > Hi All, > > Have started to look at MySQL as an alternative to MS SQL. I have a number > of sites which are solely based on Store Procedures such as the one given > below: > > CREATE PROCEDURE spr_?????? > @MSISDN bigint, > @InboundMessageText nvarchar(200), > @Type nvarchar(50), > @TriggerID int, > @OutboundMessageText nvarchar(200) > > AS > > SET NOCOUNT ON > > -- Insert the outbound message and get the ID for the inclusion in the > inbound message > INSERT INTO > EM8_OutboundMessages > (MessageText, ExpectedDateTimeTX, Status) > VALUES > (@OutboundMessageText, GetDate(), 0); > > -- Get the OutboundMessageID just created > SELECT > TOP 1 @@identity as OutBoundMessageID > FROM > EM8_OutboundMessages; > > -- Insert the inbound message based on the outboundID returned above > INSERT INTO > EM8_InboundMessages > (MSISDN, MessageText, DateTime, Type, TriggerID, OutboundMessageID) > VALUES > (@MSISDN, @InboundMessageText, GetDate(), @Type, @TriggerID, @@identity); > GO > > My question is this, I know I can access the @@identity using the > Last_Insert_ID() command but without stored procedures, am I going to have > to create 2 or 3 seperate cfquery calls to achieve the same as the above > stored procedure. > > Regards, > > Lee > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< > > _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
