Hi Greg,
Thanks so much!
I changed the cfinsert to a regular cfquery, and now it works`-`
I am so happy, you have no idea.

I can't thank you enough for all your help. This app is almost done, all that 
is left id to check for the unsubscribe page.

Thanks so much`-`
John
now I have:
<!---actionpage.cfm--->
<cfparam name="form.Name" default="">
<cfparam name="form.Email" default="">
<cfparam name="form.EmailType" default="0">

    <cfquery name="DupCheck" datasource="#REQUEST.dataSource#">
        SELECT *
        FROM Newsletter
        WHERE email = <cfqueryparam cfsqltype="cf_sql_varchar" 
value="#Form.email#" />
    </cfquery>

<!--- If our query shows a email match than using recordCount we can tell the 
user that his email address already exists in our database --->
<cfif DupCheck.recordCount GT "0">
   You are already Listed in our Mailing List!
   <!--- If our recordCount is not greater than "0" we continue on and process 
the new email address --->

<cfelse>
     <!--- Insert the new record --->
        <cfquery name="AddUser" datasource="#REQUEST.dataSource#">
           INSERT INTO Newsletter (name, email, emailType)
           VALUES ('#Form.name#', '#Form.email#', '#Form.emailType#')
        </cfquery>
     
     <cfoutput>
       Thank you #Name#,<br />
       Your email address [#Email#] Has been entered into our mailing list. 
You'll receive the next mailing!
     </cfoutput>
     
</cfif>


      

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3823
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to