Subject RE: [IBO] [Jason] Fail to prepare sentence in all my queries after update to IBO 4.9.14
Author Support List
> Hi Jason, the happy guy :)


> Sorry by incovenience, but after update to a new version IBO 4.9.14, I
> need to know if you change some metohods, I explain :
> Before (IBO 4.6), I was create a query in this way :
> m:=TIB_Query.Create(Self);
> m.IB_Connection:=SetFB.IB_Connection;
> m.sql.clear;
> m.sql.add('DELETE FROM CLIENTS');
> m.sql.add('WHERE id_client='+IntToStr(nId)+';');
> ---> m.ExecSQL;
> But now, If try this query in IBO 4.9 I receive error message "fail to
> prepare a sentence".

This should still work just fine. Perhaps you can send me a sample app
showing me the problem? I'll also need to know what version of
InterBase/Firebird you are working with as well as what version of Delphi.

> Then I need to change to :
> ---> m.ExecuteDDL(m.sql.text);
> To run satisfatory.

Actually, if you are not going to have a statement prepared and then pass in
parameter values, etc. for repeated executions, you should use this method
as it will have much faster performance.

> The same problem when I use MyIB_SQL.Execute to exec a SP like 'EXECUTE
> PROCEDURE BLABLA(...)', but now I need to change too.

This should also work just fine so I'll need to see a sample app showing me
the problem.

> I would like to know if is that right and I need to change my mind and
> change all my lines to adapter to this new method, or I doing wrong or
> it´s a IBO bug.

I don't have enough information to tell if IBO has a bug in it or not. Also,
as I said above, there may be some significant performance improvements by
using the ExecuteDML() method. Only use the ExecuteDDL() method if you are
doing things like CREATE TABLE or ALTER TABLE, etc.

Hope this helps,
Jason LeRoy Wharton