Did you check to make sure that the stored procedure in your production
environment is identical to the one on your dev environment?  If I had
to guess, I would say that the 5th parameter to your proc (results) is
not an OUTPUT parameter.  Are you using SQL Server?  If so, your
procedure should look something like this (Notice the OUTPUT keyword):

CREATE PROCEDURE [dbo].[sp_updateBasePKG]
        @in_table varchar(200),
        @in_column varchar(200),
        @in_new_value varchar(200),
        @in_where varchar(200),
        @in_results varchar(200) OUTPUT
AS
BEGIN
...
SELECT @in_results = 'Yeah, Success!'
END


Also, two other thoughts on this:

1)  If this proc call is in a webservice which may be called by more
than one person simultaneously, it is NOT thread safe.  The variable
name "results" is going to be in the variables scope by default.  The
fact that you are setting it into a locally scoped variable later only
slightly mitigates the problem (That block is currently commented out--
for testing I assume).  To eliminate concurrency issues, you need to
specify a LOCALLY scoped variable for the output of the proc to be
placed in like so:

<cfprocparam type = "OUT" cfsqltype="cf_sql_varchar"
variable="loc.results">

2)  I really, really, really, really, really, really, really, really
hope this "Generic Update" proc does some scrubbing of its inputs and
does NOT simply concatenate a SQL string with the table, column, value,
and where clause passed in and execute it or you would have just make
life really easy for some SQLi hackers.  :)

~Brad

-------- Original Message --------
Subject: Re: ajaxCFC Access Denied
From: David Torres <djt...@yahoo.com>
Date: Thu, June 18, 2009 3:35 pm
To: cf-talk <cf-talk@houseoffusion.com>

Locally this work, but at the server it gives me the following error:
"The system has attempted to use an undefined value, which usually
indicates a 
programming error, either in your code or some system code.

Null Pointers are another name for undefined values."

I commented out the OUT parameter because that is where I was having the
problem, but now is the one above "in_where" that is causing the error.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323678
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to