Skip to content
  • 0 Votes
    14 Posts
    297 Views
    J

    @JonB I do not understand anything. Please could you give more informantion.

    Note : app release folder has
    a476d8a3-0275-4b95-be08-69e8e7ca83ca-image.png

    I solved the problem :)

    I add lib files from Postgresql to release folder
    341075a5-d9d5-4598-9bb3-6bbae3cee52c-image.png

    and it works. thank you @jsulm and @JonB

  • 0 Votes
    10 Posts
    3k Views
    S

    @Christian-Ehrlicher said in QPSQL: authentication method 10 not supported:

    It was meant
    a) as a test if it helps

    True, that should have given more information - but now the fog is even denser. The result, with the same test script: same error message with md5 in all the "host" or "local" records in pg_hba.conf, after restart of PostgreSQL. It works as expected with "trust" in the same places.

    I should perhaps add that I don't use QtSql with PostgreSQL databases in earnest. I just have some test scripts - and it's quite possible that I didn't run them for every new PostgreSQL or PyQt version.

    I've had problems with QtSql using PostgreSQL or Interbase/Firebird before, but this is the first time I couldn't even find a bug report for them.

  • 0 Votes
    2 Posts
    211 Views
    D

    Well, I have discovered my problem.
    I was trying to read the file before closing it:

    QString cadenaimportar = "SELECT importar_copy('" + tabla + "','/path/conceptos.csv',)"; ...... file.close();

    And it would be:

    file.close(); QString cadenaimportar = "SELECT importar_copy('" + tabla + "','/path/conceptos.csv',)"; QSqlQuery consulta(db); if(consulta.prepare(cadenaimportar)) { consulta.exec(); } qDebug()<<consulta.lastError()<<"--"<<consulta.lastQuery();
  • 0 Votes
    27 Posts
    2k Views
    SGaistS

    I have usually seen processEvent called from the main thread directly which forces processing of events however calling it from a different thread is the first time. As you can see there's some strange interaction. I currently wonder whether you have an event that is processed by the wrong event loop.

  • 0 Votes
    18 Posts
    13k Views
    M

    Thank you very much @SGaist and @raven-worx for helping me out. I fixed this issue by using runtime libraries from this project:
    https://sourceforge.net/projects/postgresql-mingw-w64/