Results 1 to 11 of 11

Thread: Qt QSqlQuery scope issues

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2015
    Posts
    27
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt QSqlQuery scope issues

    We will try a simpler approach using the database directly on the MainWindow, instead of creating the database on a separate class.
    Then it will be simpler for you to analize the code.
    Then we will come and reply with the results
    Last edited by Wer_Bn; 17th October 2016 at 09:03.

  2. #2
    Join Date
    Apr 2015
    Posts
    27
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt QSqlQuery scope issues

    Meanwhile, we found a VERY interesting fact.

    We changed the database to the MainWindow class:
    - Database and query instance in the MainWindow Class (previously we had a database wrapper class)
    - Both variables are initialized in MainWindow Class constructor
    - query is being prepared in the contructor, after the database is created and opened
    - Upon a button pressed action, we had new entry to the database, through bind and exec. It TOTALLY works. We get as many entries as many times we press the button.

    So...
    Next step is to check if the use of DLL libraries is jeopardizing all of this. The class that used to have the database and query instances is in this DLL...
    Any feedback on this?

  3. #3
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Qt QSqlQuery scope issues

    Should be no issues with having code in your app exe or the DLL I wouldn't think. That said, I haven't had to use Windows in many years now, so perhaps someone else can chime in.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. Replies: 2
    Last Post: 26th July 2016, 00:34
  2. Replies: 5
    Last Post: 26th April 2016, 18:59
  3. Replies: 2
    Last Post: 9th April 2013, 09:15
  4. Replies: 1
    Last Post: 18th July 2011, 12:12
  5. Strange issues with QSqlQuery
    By SIFE in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2011, 10:51

Tags for this Thread

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.