Results 1 to 5 of 5

Thread: QtSql strange results after postgres stored function call

  1. #1
    Join Date
    Sep 2014
    Posts
    14
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QtSql strange results after postgres stored function call

    Hello. My program using postgresql database. I've migrated from Qt4 to Qt5, everything it's ok, but calling database stored functions, that returns Postgres "character varying" always returns empty string. Calling this function in CLI (psql) returns correct cyrillic string. Performing direct select-queries to database tables, containing cyrillic fields also returns correct cyrillic strings.

    Also, calling all of stored functions thas return strings (even consists from latin characters) - returns an empty string.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtSql strange results after postgres stored function call

    Are there any threads involved?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2014
    Posts
    14
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtSql strange results after postgres stored function call

    No, this is usual GUI single-threaded application.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtSql strange results after postgres stored function call

    Can we see some actual code?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2014
    Posts
    14
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtSql strange results after postgres stored function call

    Thanks, i've found reason. I am using named parameters and bindValue of QSqlQuery. In my database tables and functions names look like "prefix$object_name". Escaping $ symbol fully solves the problem. Is it correct behaviour? I am not mixing named and positional parameters,

Similar Threads

  1. Replies: 1
    Last Post: 6th March 2023, 12:05
  2. Replies: 4
    Last Post: 2nd August 2012, 07:42
  3. QtSql write results to XML Hierarchy for List
    By prophet0 in forum Qt Programming
    Replies: 6
    Last Post: 15th April 2012, 04:10
  4. stored proc with QtSql
    By xyzt in forum Qt Programming
    Replies: 1
    Last Post: 17th February 2009, 09:12
  5. QSqlQuery and Oracle stored function
    By sawerset in forum Qt Programming
    Replies: 0
    Last Post: 22nd December 2008, 18:48

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.