Skip navigation
Currently Being Moderated

Integrating with .NET

Jun 11, 2010 4:43 PM

Hey All,

I want to call a Colf-fusion method from my .NET code.  I never code in CF, is there a way i can make a call to CF functions that returns value and can use that value in my C# class in .NET

code snippet i had

   <cffunction name="getResult" access="public" returntype="query">

<cfargument name="d_id" required="Yes">

                                <cfargument name="trk_name" required="Yes">

<cfquery name="get_details" datasource="xyx">

select...

</cfquery> //various queries like this..

  <cfif Not(IsDefined("get_details"))>

                <cfset get_details = QueryNew("")>

        </cfif>

<cfreturn get_details>

                </cffunction>

To be more clear- Is there a way i can call the function which returns get_details

Would appreciate if any one can help in suggesting some solution to this,

Thanks

 
Replies
  • Currently Being Moderated
    Jun 14, 2010 6:36 AM   in reply to SDE_SAL

    Call it as a webservice.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2010 9:45 AM   in reply to SDE_SAL

    Change the first line of the function to this:

     

    <cffunction name="getResult" access="remote" returntype="query">

     

    This assumes that one, this function is inside of a CFC and is not just a User Defiend Function in some random template.  And secondly that the CFC is in a web accessable location so that one can enter a URL path to access it in a browser.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points