Results 1 to 8 of 8

Thread: Stored procedure return values problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Stored procedure return values problem

    then use this prior to calling bindValue:
    Qt Code:
    1. memset(fpc, 0, sizeof(char)*525);
    To copy to clipboard, switch view to plain text mode 

    This way you make sure you will always have a null at the end of your string, in case the stored procedure returns a smaller number of characters.

    You can even increase the size of the array to 1024 or 2048, but make sure to create it on the heap, not on the stack.

    Regards

  2. #2
    Join Date
    Aug 2007
    Posts
    11
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Stored procedure return values problem

    Rats! That gives a null returned value.
    Cheers,

    Jim

  3. #3
    Join Date
    Aug 2007
    Posts
    11
    Qt products
    Qt3
    Platforms
    Windows

    Thumbs down Re: Stored procedure return values problem

    Hi all,

    My company finally got my Qt maintenance renewed so I could pose this to Trolltech. They say it is a bug in Qt 3.3.x which also exists in Qt 4.

    I have had to revise my stored procedures to append a ",end" at the end of any returned strings so I can then extract the substring to the left of that.

    Cheers,
    Jim
    Cheers,

    Jim

Similar Threads

  1. Stored procedure and ODBC
    By filya in forum Qt Programming
    Replies: 2
    Last Post: 15th March 2010, 08:40
  2. no record returns from stored procedure
    By mandal in forum Qt Programming
    Replies: 0
    Last Post: 26th April 2007, 14:45
  3. MySql Stored Procedures Woes
    By stevey in forum Qt Programming
    Replies: 9
    Last Post: 19th October 2006, 12:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.