Hi,

Yeah I realised after I read your message that I made a typo.
It should have been a call to SP CreateNewJob in the CreatJob function (slaps head).

The whole problem in the end was that my InertNewImage SP was flawed.
The issue was that I wasn't checking the lasterror().
In my full time job I do mostly C# programming, and ADO with SqlServer returns exceptions when things go haywire which causes the program to crash if you don't catch the exception.
QSqlQuery obviusly handles it all completely differently.
I figured that because there was no crash, then it was all okay.

Another thing I'm used to also is returning -1 int my p_identity out parameter.
If you set a value here then QSqlQuery will succeed on the .exec(command).
So the key here is to never assign a value to the out parameters, so if somethings goes wrong and you don't get to the SET p_identity = LAST_INSERT_ID(); at the end of the SP, then the out parameter will return NULL, in turn causing the .exec() to return false.

I now have my image records appearing.
Thanks Jacek for pointing out the test and qDebug message (why did I not think of it ? ).
It gave me the message I needed to work out how to proceed.
Above all I need to drop my .net habits.


Steve York