hi , I'm writing a code to insert some values to my database , and there are 7 
of them . but when I run it , CF tells me that the function takes 3 parameters 
.the code is really simple and I don't get what's wrong  . so anyone has any 
experience with this , I'll be appriciated if you can help. 
here's my code :

<cfcomponent>
        <cfprocessingdirective pageencoding="utf-8">
        <cfset setEncoding("form","utf-8")>
        <cfset setEncoding("url","utf-8")>
        <cfcontent type="text/html ; charset=UTF-8">

                <cffunction name="insert" access="remote" returntype="void">
                        <cfargument name="username" type="string" 
required="true">
                        <cfargument name="password" type="string" 
required="true">
                        <cfargument name="fname" type="string" required="true">
                        <cfargument name="lname" type="string" required="true">
                        <cfargument name="ncard" type="numeric" required="true">
                        <cfargument name="age" type="numeric" required="true">
                        <cfargument name="sex" type="string" required="true">
                        <cfquery name="qInsert" datasource="Library">
                        insert into 
Users(username,password,fname,lname,nationalCard,age,sex) values(<cfqueryparam 
value=#username# cfsqltype="cf_sql_varchar">,<cfqueryparam value=#password# 
cfsqltype="cf_sql_varchar">,<cfqueryparam value=#fname# 
cfsqltype="cf_sql_varchar">,<cfqueryparam value=#lname# 
cfsqltype="cf_sql_varchar">,<cfqueryparam value=#ncard# 
cfsqltype="cf_sql_numeric">,<cfqueryparam value=#age# 
cfsqltype="cf_sql_numeric">,<cfqueryparam value=#sex# 
cfsqltype="cf_sql_varchar">)
                        </cfquery>
                </cffunction>

                <cfdump var=#insert("gk","ad","fo","ew",32444,43,"male")#/>
        </cfcontent>
</cfcomponent>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339447
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to