Unassigned Code - Question

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

Unassigned Code - Question

Post by michaelJ » Fri 14 Jan 2011 08:06

Hello,

in some Cases I get the EIBCError-Message 'unassigned code'.
I Use TIBCQuery with Select und Insert Statements
IBCQuery.SQL.Text:='INSERT INTO TABLE1(......)
ExecSQL

What could be the reason for this Errormessage? What is the background?

Michael

Additional information:
IBDAC V3.50.0.19
I uses FB 1.5 (ODS 10.1) Dialect3
With IBX (D2007) it works fine. After Migration toIBDAC the problem occours

AndreyZ

Post by AndreyZ » Fri 14 Jan 2011 15:24

Hello,

I cannot reproduce the problem. Please specify the following:
- the exact SQL statement;
- the table structure (script).

michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

Post by michaelJ » Fri 14 Jan 2011 15:38

Hello,

This ist the metadata from the Table:

Code: Select all

CREATE TABLE DOKUMENTE (
    DOKID         INTEGER NOT NULL,
    DOKREFID      INTEGER NOT NULL,
    DOKART        INTEGER NOT NULL,
    CLT_ID        INTEGER DEFAULT NULL,
    MNF_ID        INTEGER DEFAULT NULL,
    BELEGNR       VARCHAR(20),
    DOKUMENTBILD  BLOB SUB_TYPE 0 SEGMENT SIZE 80 DEFAULT NULL
);

When I start this code everything works wine.....

Code: Select all

 if not DM.TR_MTG.Active then DM.TR_MTG.StartTransaction;
  if DM.Q_TMP.Active then DM.Q_TMP.Close;
  DM.Q_TMP.SQL.Clear;
  DM.Q_TMP.Params.Clear;
  DM.Q_TMP.SQL.Text:='INSERT INTO DOKUMENTE(DOKID,DOKREFID,DOKART,CLT_ID,MNF_ID,BELEGNR,DOKUMENTBILD) VALUES (:DOKID, :DOKREFID, :DOKART, :CLT_ID, :MNF_ID, :BELEGNR, :DOKUMENTBILD);';
  DM.Q_TMP.ParamByName('DOKID').AsInteger:=GetLfdNr('DOK','I');
  DM.Q_TMP.ParamByName('DOKREFID').AsInteger:=DokRefID;
  DM.Q_TMP.ParamByName('DOKART').AsInteger:=DokArt;
  DM.Q_TMP.ParamByName('CLT_ID').AsInteger:=Clt_ID;
  DM.Q_TMP.ParamByName('MNF_ID').AsInteger:=Mnf_ID;
  DM.Q_TMP.ParamByName('BELEGNR').AsString:=BelegNr;
  DM.Q_TMP.ParamByName('DOKUMENTBILD').LoadFromStream(Dokumentbild,ftBlob);
  try
   DM.Q_TMP.ExecSQL;
   DM.TR_MTG.commit;
  except
   begin
    DM.TR_MTG.Rollback;
   ShowMessage('Dokumentenbild konnte nicht gespeichert werden!');
   end;
  end;
end;
.... But when i call afer this:

Code: Select all

  if DM.Q_TMP.Active then
  DM.Q_TMP.Close;

I've got the ErrorMessage 'Unassigned Code' in the Moment when I close the IBCQuery. Strange?!

What could be the reason?

Thanks,

Michael

AndreyZ

Post by AndreyZ » Mon 17 Jan 2011 08:22

Unfortunately, I still cannot reproduce the problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com.

michaelJ
Posts: 30
Joined: Thu 13 Jan 2011 16:11

Post by michaelJ » Fri 18 Feb 2011 13:13

AndreyZ wrote:Unfortunately, I still cannot reproduce the problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com.

Problem is solved. It was a RT-Error. A other function has changed the SQL-statement, at the same time.

Michael

AndreyZ

Post by AndreyZ » Fri 18 Feb 2011 13:38

It is good to see that this problem was solved. If any other questions come up, please contact us.

Post Reply