Hey Aaron, I always thought that cfprocparam was for cfstoredproc - and cfqueryparam was for cfquery.

MySQL's inability to compile a stored procedure - due to syntax problems - does not sound like an OpenBD problem.

In general, I think stored procedures are supposed to be faster than SQL scripting. But the difference may only be important when the application approaches a high volume of traffic.

Like you, I often prefer <cfquery> - and progress to the other options as the application matures.

Al

On 3/29/2014 1:21 PM, Douglas McGregor wrote:
Alan, just to let you know I tried to modify the stored procedure in MySQL but it kept complaining about syntax errors.  Also when I had another go at <cfstoredproc> it said that there is no value specified for parameter 10 when there was.  But I've had a lot of success with <cfquery>, even with output parameters.  I think I might stick with <cfquery> just to make life easier, but it would be nice to have the option to use <cfstoredproc> as well.  Thought it would be good for people to see what ended up working:

<cfquery datasource="PersonalWebsiteCF" name="NewUser" result="Register">
         Call AddUser(
                      <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="#form.txtFirstName#" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="#form.txtLastName#" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="#form.txtEmail#" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="#form.txtUsername#" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="#form.txtPassword#" />,
                       <cfqueryparam cfsqltype="cf_sql_timestamp" type="in" value="#Now()#" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="#cgi.remote_addr#" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="Member" />,
                       <cfqueryparam cfsqltype="cf_sql_varchar" type="in" value="No" />,
                         @strUserID
             );
</cfquery>
                       
<cfquery datasource="PersonalWebsiteCF" name="GetID" result="UserID">
         SELECT @strUserID;
 </cfquery>
                       
<cfset UserID = #GetID["@strUserID"][1]# />
                       
<cfoutput>
      #UserID#                           
</cfoutput>


Cheers

Douglas
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to