Hello all. Hope any of you celebrating 4th of July had a good one.

I have a question about the code below. This was done by a colleague of
mine, he is pretty handy with SQL coding. One of his observations was the
time involved in writing stored procedures and then calling them with
CFSTORPROC. I agree, that discouraged me somewhat in the past, but I knew of
no other way. He put this transact-sql query together and it seems solid,
works well.

My question(s): Have any of you tried this? Any problems? Can anyone see a
potential problem?

Thanks. -Gary McNeel

<CFQUERY name="InsertLkpRec" datasource="#Application.DSN#">
        DECLARE @LookupID char(6)
        DECLARE @MembersID char(6)
<!--- Insert Member Lookup Record --->
        INSERT INTO tblMemberLkp
        (DBAName, ReferredBy )
        VALUES
        ('#Form.DBAName#', '#Form.ReferredBy#')

        SELECT @LookupID = @@IDENTITY

<!---- Members Record --->
        INSERT INTO Members
        (MemberLkpID)
    VALUES
        (@LookupID)

    SELECT @MembersID = @@IDENTITY

<!--- Insert Site Info record --->
        INSERT INTO tblSiteInfo
        (BusName, Website, RecStatusID, RecOriginID, MembersID,
        PartnerNumber, SourceID, ApplicationDate)
    VALUES
        ('#Form.BusName#', '#Lcase(Form.Website)#', 2, 1, @MembersID,
        '#Form.PartnerNumber#', '#Form.SourceID#', getdate())
    </CFQUERY>


Gary McNeel, Jr.
Project Manager - DAC-Net, Research & Graduate Studies
Rice University - Houston
[Lovett Hall] 713-348-6266 (Primary)
[DAC] 713-348-5184
[M] 713-962-0885
[H] 713-723-9240

"Great spirits have always encountered violent opposition from mediocre
minds."
   -Albert Einstein

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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