Never really had to user cursors before now, thank god.

Now I have to :(

So we are comparing performance across several different drivers and such.

Right now I'm stuck on getting something that will even run.

I'm trying this:

<cftry>
        <cfquery name="tryCursor" datasource="mpestest">
                Declare CursorPas Cursor for
                        Select
                                par_pas_nr
                        From
                                pas_data_ref
                        Where
                                pas_nr = 'F3LQ'

                        open CursorPas
                        fetch CursorPas into myField
                        close CursorPas
        </cfquery>
        <cfcatch type="any">
                <cfset myVar =  cfcatch.rootCause.Sqlca.getMessage()>
                <cftrace var="#myVar#" inline="true" />
                <cfdump var="#cfcatch#">
                <cftrace var="#cfcatch#" inline="true" />
                <cfabort>
        </cfcatch>

</cftry>
<cfdump var="#tryCursor#">

To see if we can execute cursors inline, becuase we cannot use stored
procedures.

Is there something wrong with that?

I don't even know, this is cobbeled together from a couple different
sources.

Generated SQL:

Declare CursorPas Cursor for Select par_pas_nr From aftest.pas_data_ref
Where pas_nr = 'F3LQ' open CursorPas fetch CursorPas into myField close
CursorPas

SQL Code: -199
SQL State: 42601

TIA



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257824
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to