Hello,

I am trying to create a dropdown for an opt-in / opt-out for receiving emails 
sent out by the site and keep getting the error "Invalid data form.getMail for 
CFSQLTYPE CF_SQL_BIT." when i hit update.

the section of code being quotes is line 142

141:<cfprocparam type="in" cfsqltype="cf_sql_integer" value="form.getMail" 
dbvarname="@GetMail">
142:<cfprocresult name="qryMember" resultset="1">
143:</cfstoredproc>

the section of the form when the choice is being made is:

<tr>
   <td class="mainText">Receive Emails:</td>
   <cfquery datasource="#request.dsn#" name="qryMail">dbo.spGetMail 
#request.user.userID#</cfquery>
   <td>
     <select name="getMail" class="mainText">
       <option selected>Yes or No
       <option<cfif qryMail.GetMail eq 1 > selected</cfif> value="1">Yes
       <option<cfif qryMail.GetMail eq 0> selected</cfif> value="0">No
     </select>
   </td>
   <td class="mainText" valign="top">*</td>
</tr>

The stored procedure is:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[spGetMail]
        @MemberID       int = null
as
        select  memberID, getMail
        from    dbo.member
        where   (memberID = @MemberID or @MemberID is null)


/*spGetMail 1*/

and the update stored procedure is:

ALTER procedure [dbo].[spMemberProfileUpd]
        @memberID       int,
        @firstName      varchar(50),
        @lastName       varchar(50),
        @countryID      varchar(25),
        @email          varchar(100),
        @organization   varchar(100),
        @password       varchar(50),
        @CategoryID     int = null,
        @Occupation     varchar(100),
        @GetMail bit,
        @memberTypeID int = null
AS
        if not exists (select memberID from dbo.member where Email = @email and 
memberID != @memberID) begin
                UPDATE  member
                SET     firstName = @firstName,
                        lastName = @lastName,
                        CountryID = @countryID,
                        Email = @email,
                        password = @password,
                        organization = @organization,
                        categoryID = @categoryID,
                        occupation = @occupation,
                        getMail = @GetMail
                WHERE   memberID = @memberID

                if (@memberTypeID is not null) begin
                        UPDATE  member
                        SET     memberTypeID = @memberTypeID
                        WHERE   memberID = @memberID
                end
                select isError = 0
        end
        else
                select isError = 1

can anyone please give me a heads up as to what i am doing wrong?

Thanks 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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-Talk/message.cfm/messageid:312543
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to