Board index » delphi » Invalid Request BLR

Invalid Request BLR

Hi,

I am getting the following error

Invalid Request BLR at offset 224 Implementation Limit Exceeded Block size
exceeds implementation restriction

when using the code below

with TIBQuery.Create(Application) do
  try
    Database := fDataModule.IBDatabase;
    SQL.Text := 'SELECT * FROM ' + TableName;     <----------------- fails
here

the table is not very large and consists on only small varchars and ints

Any ideas why this happens?

--
Regards
Justin Temby
Practical Programs

 

Re:Invalid Request BLR


In article <3d215600_1@dnews>, supp...@practicalprograms.com says...
Quote
> I am getting the following error

> Invalid Request BLR at offset 224 Implementation Limit Exceeded Block size
> exceeds implementation restriction

> when using the code below

> with TIBQuery.Create(Application) do
>   try
>     Database := fDataModule.IBDatabase;
>     SQL.Text := 'SELECT * FROM ' + TableName;     <----------------- fails
> here

> the table is not very large and consists on only small varchars and ints

> Any ideas why this happens?

        I find this description hard to believe.  Assigning to SQL.Text
causes exactly 0 calls to the IB API, and it's an IB error you're
seeing.  I think the failure must be elsewhere in the code.

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
     Delphi/InterBase WebLog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer

Re:Invalid Request BLR


Quote
Justin Temby wrote:
> Hi,

Hello :)

Quote
> I am getting the following error
> Invalid Request BLR at offset 224 Implementation Limit Exceeded Block size
> exceeds implementation restriction when using the code below

> with TIBQuery.Create(Application) do
>   try
>     Database := fDataModule.IBDatabase;
>     SQL.Text := 'SELECT * FROM ' + TableName;     <----------------- fails
> here

> Any ideas why this happens?

Justin,

You need to assign your dynamic SQL statements as follows.

with TIBQuery.Create(Application) do
  try
    Database := fDataModule.IBDatabase;
    SQL.Add('SELECT * FROM ' + TableName);
    Open;
   // do something with the results here
  finally
    Free;
    end;

The Text property of a TQuery is the internal representation. Ignore it as it
has no use to you.

Allen.

Re:Invalid Request BLR


On second thought. My comment about the SQL.Text property was wrong. I was
thinking of the SQLBinary property.

If my example does not work for you, then please post the ENTIRE proc where
you create and open the query.

The place you marked as the error is also not your problem. Setting the Text
property does not open the query nor does it pass anything to the server at
that point. Not until you call Open or ExecSQL (or Prepare) does it go to the
server. Something else you have done is more likely the cause of your problem.

Allen.

Re:Invalid Request BLR


In article <3D22826D.6C3E0...@nisnic.com>, al...@nisnic.com says...
Quote
> The Text property of a TQuery is the internal representation. Ignore it as it
> has no use to you.

        TQuery/TIBQuery.SQL is of class TStrings.  It's OK to assign to
TStrings.Text; check the Help on this.

        As far as I can remember, assigning to TIBQuery.SQL doesn't result
in an IB API call, and the message Justin is seeing is an IB error, so I
don't think the error he's seeing is caused by the code he posted.

        Jeff can correct me on this if I'm remembering incorrectly.

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
     Delphi/InterBase WebLog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer

Other Threads