Results 1 to 20 of 57

Thread: Record update windowd entered data saving

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Record update windowd entered data saving

    Same result, empty record added to table, when I reopen the window, this empty record is not shown, so I neither does add empty neither filled record to database. Is maybe problem in QSqlDelegate?
    Last edited by MarkoSan; 6th January 2006 at 08:59.
    Qt 5.3 Opensource & Creator 3.1.2

  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: Record update windowd entered data saving

    Maybe the problem is with MySQL 5.0?

    Did you try debugging to see if Qt even tries to fill those fields?

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Record update windowd entered data saving

    As i posted earlier, I think the statement:
    QSqlQuery::lastQuery returned "SELECT stranka.SIFRA,stranka.DS,stranka.PRIIMEK,stranka.I ME,ulica.naziv,stranka.STEVILKA_ULICE,kraj.naziv_k raja FROM stranka,u"size=217
    ,which is created in method insertRecord is not correct.

    Since I am total newbie in SQL, am I right or not?

    It seems, but it is not logical, that method insertRecord does not create an SQL statment, but it should, as I understand the whole thing.

    Or maybe, in the docs there is definition of method:
    Qt Code:
    1. bool QSqlTableModel::insertRecord ( int [I]row[/I], const [URL="http://www.qtcentre.org/forum/qsqlrecord.html"][COLOR=#0000ff][U]QSqlRecord[/U][/COLOR][/URL] & [I]record[/I] )
    To copy to clipboard, switch view to plain text mode 
    The statement in my project is:
    Qt Code:
    1. if(m_pTableModel->insertRecord(INSERT_RECORD_AT_END, cDataRecord))
    To copy to clipboard, switch view to plain text mode 
    cDataRecord is declared as:
    Qt Code:
    1. QSqlRecord cDataRecord;
    To copy to clipboard, switch view to plain text mode 
    As far as I can see, the second parameter is reference to sql record, but i pass like insertRecord(-1, cDataRecord), as seen earlier. Is this ok or not?
    Last edited by MarkoSan; 7th January 2006 at 11:03.
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Record update windowd entered data saving

    No one has idea????
    Qt 5.3 Opensource & Creator 3.1.2

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.