JTigchelaar
Member
I have a Query component on a form, which contains the following SQL code:
In my code i do the following:
I'm not sure whether the AsString part can work, but it quits with the error: Unknown variable P_REPORT when i call execute.
Can anybody tell me what i'm doing wrong?
Code:update organisation set date_upd = :P_DATE ,reason_upd = :P_REASON ,Report_Upd = empty_clob() where code = :P_CLIENT returning Report_Upd into :P_REPORT
In my code i do the following:
Code:UpdateQuery.DeclareVariable( 'P_CLIENT', otString ); UpdateQuery.DeclareVariable( 'P_DATE', otDate ); UpdateQuery.DeclareVariable( 'P_REASON', otString ); UpdateQuery.DeclareVariable( 'P_REPORT', otCLOB ); UpdateQuery.SetVariable( 'P_CLIENT', LeftStr( lbl_Client.Caption, 12 ) ); UpdateQuery.SetVariable( 'P_DATE', StrToDate(LeftStr( lbl_Date.Caption, 10 )) ); UpdateQuery.SetVariable( 'P_REASON', lbl_Reason.Caption ); LOB := TLOBLocator.Create(UpdateQuery.Session, otCLOB); Query.SetComplexVariable('P_REPORT', LOB); UpdateQuery.Execute; LOB.AsString := slTemp.GetText;
I'm not sure whether the AsString part can work, but it quits with the error: Unknown variable P_REPORT when i call execute.
Can anybody tell me what i'm doing wrong?