Solved . Sorry for wasting your time
Lykurg, you was right.
The error was that the QObject::connect that calls the updatemethod (as a slot) was inserted in a for-cicle.
I thought that even if the qobject::connect was setted 2,3 o more times the slot was called just one time. evidently I was wrong.
The problem was something like this:
.
.
.
QObject::connect(client
SIGNAL(doUpdate
(QString)), Database,
SLOT (updateDB
(QString)));
// n times the connect was setted
QObject::connect(client SIGNAL(doUpdate(QString)), Database, SLOT (updateDB(QString)));
QObject::connect(client SIGNAL(doUpdate(QString)), Database, SLOT (updateDB(QString)));
.
.
.
QObject::connect(client SIGNAL(doUpdate(QString)), Database, SLOT (updateDB(QString)));// n times the connect was setted
To copy to clipboard, switch view to plain text mode
And then the update query will be executed N times for each single time that signal is emitted. I though instead that the query was executed just one time.
I know that's stupid mistake i've done, but documentation lack in this point.
Thanks at all and sorry again
Gianluigi
Bookmarks