Thank you Shane, Scott, Grant

Working Solution below for MS SQL 2000

*****************************************************

<cftransaction>
<cfquery name="fst_insert" datasource="#APPLICATION.DB#" 
USERNAME="#APPLICATION.UN#" PASSWORD="#APPLICATION.PW#">
INSERT INTO #APPLICATION.DBPRE#Subscribe
                        (FirstName,
                         LastName,
                         Company,
                         StreetAddress,
                         StreetAddress2,
                         City,
                         State,
                         ZipCode,
                         Country,
                         PhoneNumber,
                         SubscriberEmail,
                         <!---UserLists,--->
                         UserConfirmed,
                         CreatedDate,
                         IsEmValid)
        VALUES
                        ('#Trim(form.FirstName)#',
                         '#Trim(form.LastName)#',
                         '#Trim(COMPANY)#',
                         '#Trim(form.StreetAddress)#',
                         '#Trim(STREETADDRESS2)#',
                         '#Trim(form.City)#',
                         '#Trim(form.State)#',
                         '#Trim(form.ZipCode)#',
                         '#Trim(form.Country)#',
                         '#Trim(form.PhoneNumber)#',
                         '#Trim(form.SubscriberEmail)#',
                         <!---'#Trim(form.UserLists)#',--->
                         1,
                         '#DateFormat(Now(), "yyyy-mm-dd")#',
                         1)
                         SELECT @@IDENTITY AS NEW_ID
</cfquery>

<cfquery name="sec_insert" datasource="#APPLICATION.DB#" 
USERNAME="#APPLICATION.UN#" PASSWORD="#APPLICATION.PW#">
INSERT INTO #APPLICATION.DBPRE#ContactLog
                        (id_contact,
                         id_campaign)
        VALUES
                        (#fst_insert.new_id#,
                         1)
</cfquery>
</cftransaction>

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to