Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008

    Unanswered: Problem with sp_cursorfetch

    I am using powerbuilder and MS SQL2005 for my application. The problem is whenever I am writing an embedded sql in powerbuilder, it is getting converted into a server side cursor implicitly and sp_cursorfetch is fetching
    only 1 row at a time, as a result the application is taking hell lot of time to retreive data.

    My query in Powerbuilder:

    SELECT DISTINCT logon_control.logon_user , logon_control.logon_name , logon_control.contact_id FROM logon_control WHERE ( logon_control.record_status_code <> 'X' )

    Which is implicitly getting converted into :

    declare @P1 int set @P1=180150028 declare @P2 int set @P2=8 declare @P3 int set @P3=1 declare @P4 int set @P4=207 exec sp_cursoropen @P1 output, N' SELECT DISTINCT logon_control.logon_user , logon_control.logon_name ,

    exec sp_cursorfetch 180150028, 16, 1, 1
    exec sp_cursorfetch 180150028, 16, 2, 1

    The number of rows to be fetched is the last argument in the sp_cursorfetch statement. How to increase the number of rows to be fetched?

    Plz help

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Nose around SQLCA a bit, there is an attribute that you need to change, but I don't remember its name (actually names, since they seem to chane from one release of PFC to another).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts