>- 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 -<

Reply via email to