Skip to main content
nikos101
Inspiring
February 26, 2009
Question

If the result from the stored procedure returns 0 rows I get this error returned:

  • February 26, 2009
  • 4 replies
  • 1237 views
If the result from the following stored procedure returns 0 rows I get this error returned:

faultCode:Server.Processing faultString:'Variable transfers is undefined.' faultDetail:''

How can I get round this?
This topic has been closed for replies.

4 replies

nikos101
nikos101Author
Inspiring
March 6, 2009
I've just went and catched the error instead of trying to stop it, thanks anyway.
Inspiring
February 27, 2009
Alternatively, you can send odbctimestamp variables instead of strings.
nikos101
nikos101Author
Inspiring
February 27, 2009
Well if I try this in a cfm page:

<cfstoredproc procedure="GetTransfers" datasource="datasource" returncode="true">
<cfprocparam type="in" cfsqltype="CF_SQL_VARCHAR" value="4">
<cfprocparam type="in" cfsqltype="cf_sql_date" value="12/09/2006 08:42:00">
<cfprocparam type="in" cfsqltype="cf_sql_date" value="12/09/2008 08:42:00">
<cfprocresult name="transfers">

I get an error like:

[Macromedia][SQLServer JDBC Driver][SQLServer]Procedure or function 'GetTransfers' expects parameter '@fromdate', which was not supplied.


But this procedure only accepts 3 parameters.
Inspiring
February 27, 2009
You might try cf_sql_timestamp instead of cf_sql_date. If this doesn't help please provide:
1. Your database server product and version.
2. Your stored procedure, at least the definition for the input / output parameters.
Inspiring
February 26, 2009
You can used the IsDefined function to check if a variable is defined. I've never seen this behavior with a stored procedure resultset. What database are you using?

See sample.
Inspiring
February 26, 2009
After re-reading your post I realize that I may have misunderstood your problem.

Does the function call throw an exeception only when called remotely (as SOAP web service or Flash remoting object)?

Does the function work correctly when called by a local CFM page even when returning an empty query object?