5 Replies Latest reply on Sep 10, 2007 12:18 PM by davidttt

    anybody can give me hand

      Big headache bother me 3 days, I run the function from SQL 2005 even just take 0.1s, but when I try to call the function from the CF scripts, it loops forever, the server host CF 6.1MX, anybody can give me a hint how to solve it?
        • 1. Re: anybody can give me hand
          Grizzly9279 Level 1
          Is it possible that ColdFusion is expecting/waiting for a return value?

          Is this a user-defined function in SQL 2005? If so, does it return VOID/NULL or something along those lines? If so, you may want to create it as a stored procedure instead of a function.

          How are you invoking this function/procedure from ColdFusion?
          • 2. anybody can give me hand
            davidttt Level 1
            thanks for your reply!
            it is a UDF return a value, actually it return a value inside the management studio very fast, no void/null return along with.

            from cf
            <cfquery name="test" dataSource="whateve">
            dbo.functionName(888) as testValue

            Hosted by CF61MX +FUSEBOX 3
            • 3. Re: anybody can give me hand
              Grizzly9279 Level 1
              Hmm, I'm not sure what to tell you than. The best you can do is enable as much debug/logging as possible, and start sniffing around on both the CF server and the DB server to identify the source of the problem.

              You may need to temporarily add some break points in your query, or in the UDF itself to try and narrow down the source of the problem.

              Unfortunately this is one of those things that is going to be difficult for anyone to remotely diagnose with the little tidbit of information that you provided.

              Best of luck with it, and feel free to come back and reply again if you think you've discovered some additional info that could help point us to the root cause of the issue.
              • 4. Re: anybody can give me hand
                Level 7
                davidttt wrote:

                i tested cf8 (JDBC driver) using the BOL's ISOweek function as well as a
                function that returned simple inline table. both worked fine.

                > <cfquery name="test">
                > select
                > dbo.functionName(888) as testValue
                > ...
                > </cfquery>

                you seem to be missing your dsn parameter for that cfquery?

                • 5. Re: anybody can give me hand
                  davidttt Level 1
                  not that kind of issue, I still don't understand why it's working now, the DSN is fine !(maybe the database server reboot), I will wait to see it tomorrow.

                  I wanna make sure it works stably!