Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Small CFC variable problem 1

Status
Not open for further replies.

DBAssam

Programmer
Feb 8, 2002
19
0
0
GB
I have created a small CFC that is designed to accept any SQL query and execute against a data source. It works when the query is hardcoded, but I can't seem to pass the variable correctly:

CFC:

<cfcomponent>
<cffunction name="sendSQL" access="remote" output="true" returntype="query">
<cfargument name="sqlvar" type="string" required="True" default="">
<cfquery name="SQLQuery" datasource="flamingo" >
#arguments.sqlvar#
</cfquery>
<cfreturn SQLQuery>
</cffunction>
</cfcomponent>


INVOKED BY:
<cfinvoke
webservice=" method="sendSQL"
returnvariable="query" sqlvar="#sqlquery#" >
</cfinvoke>

ERROR is:

Web service operation "sendSQL" with parameters {SQLVAR={select contactname from invoice},} could not be found.

Any ideas would be gratefully received :)
 
Solved this by deleting out the web service in administrator and invoking again - cheers
 
Thank you for sharing the answer. Star for you.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top