pkgApply and LOB

ckunar

Member
Environment: Delphi 5 and DOA 3.4.1

I am trying to use the pkgApply to show me how to use the OnApplyRecord. I am trying to update a CLOB column in a table using the same structure represented in pkgApply but I am getting the following error: Pass LongInt(object) to complex variable :NOTES.

I don't know if this is referring to my LOB or not.

Here is the code I am using in the update of my case statement:
with workQuery do
begin
Call := 'GSD.NotesAPI.UpdateRecord(
redface.gif
ld_instance, :instance, :notes, :classification)';
Clear;
SQL.Add('begin');
SQL.Add(' ' + Call + ';');
SQL.Add('end;');
Sender.DeclareQueryVariables(workQuery);
Sender.SetQueryVariables(workQuery);
Execute;
notes.Text := GetVariable('notes').asString;
securityLevel.Text := GetVariable('classification');
end;

I am trying to update the notes field (the CLOB).

Any help would be appreciated.
 
The SetQueryVariables procedure does not work for CLOB's and BLOB's. You will have to create a TLOBLocator instance, use SetComplexVariable to pass it to the query, return an initialized LOB from your procedure call, and write the data after the procedure call.

------------------
Marco Kalter
Allround Automations
 
I must admit that I am not certain how to return an initialized LOB from my procedure call. The SetComplexVariable makes sense to me and I have completed that code. If you could help me understand the last part of your response a little better I would be so appreciative.
 
See this topic for a complete example.

------------------
Marco Kalter
Allround Automations

[This message has been edited by mkalter (edited 27 June 2003).]
 
Back
Top