Subject RE: [IBO] GSG010. PLAN error in IBOQuery
Author Norman Dunbar
Morning Raymond,

I've always had this PLAN ERROR problem too. I find that the plan is
correctly generated when you press the PREPARE button. I have not looked
into it yet, but I presume (read guess) that it is because the Interbase
parser cannot generate a plan until such time as it has actually parsed the
sql in question. I'm basing this on Oracle - which I know more about, as it
is my real job - which does the following :

perform a syntax & semantic check of the sql
check permissions on all objects accessed in the statement
perform a hash function on the sql to give unique hash value for the command
lookup already parsed sql in the library cache and see if there is a hit on
a statement with the same hash value as the one we just calculated
if so, we have an already parsed statement identical to the new one, skip
the next two steps

build a parse tree
build an execution plan

execute the statement (if this is the execute phase !)

I assume that a similar thing happens within IBO. When you PREPARE the
statement, the server does some or all of the above and a plan is generated,
however, if you don't prepare and only hit the APPLY button, the SQL is
assigned to the SQL property of the query and an attempt is made to obtain
the plan from the server. Because the plan hasn't been generated (becaue the
SQL hasn't been prepared) there is no plan to fetch, hence PLAN ERROR.

I'm sure someone more knowledgeable than I am about Firebird internals will
point out the errors in what I have written above :o)


Cheers,
Norman.


-------------------------------------
Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@...
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------


-----Original Message-----
From: Raymond Kennington [mailto:raymondk@...]
Sent: Monday, October 07, 2002 4:42 PM
To: IBObjects
Subject: [IBO] GSG010. PLAN error in IBOQuery


In IBOQuery:

SELECT CUSTOMER_NAME
FROM CUSTOMER
ORDER by CUSTOMER_NAME

(a) After entering a simple query why does Apply generate a PLAN error?

(b) Even though there is a PLAN error, pressing Ok saves the query, and then
setting it
active works.

Why? What are the consequences of having it work even though Apply gives
an error?

(c) Attempt to edit the row: "Cannot edit current row."

How to allow editing?
--
Raymond Kennington
Programming Solutions
W2W Team B




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.