Subject RE: [IBO] Problems opening IBQuery
Author Claudio Valderrama C.
First of all, do not make your life complex if you don't need. For making a
query editable, you don't need to write EditSQL, InsertSQL and UpdateSQL.
IBO will calculated them for you. Turn RequestLive to true and it will work.
Fill in those properties only when IBO cannot generate these sentences
automatically, for example if you have
select t.a, t.b, s.x, s.y
from tablea t join tableb s
on t.a = s.y
so IBO will need to know what do update or when your modifications,
insertions and deletions should invoke a procedure in the server.

Second, there's something strange in your settings:

editsql: UPDATE AFDKMU SET
CODE = :CODE,
AFDELINGKMU = :AFDELINGKMU

Usually UPDATE has a clause:
UPDATE tbl SET f = :v, ... WHERE PK = :pk_value
in this case, where's you WHERE restriction? You seem to be updating all the
table in each operation!

insertsql: INSERT INTO AFDKMU(CODE,
AFDELINGKMU)

Please read LangRef, it's downloadable in a zip format that contains all the
beta IB documentation. It should be available from Borland. This is the
wrong syntax for the INSERT command:
insert into tbl(field, field2) values(:v_field, :v_field2)

Third, are you sure you want to insert in your delete statement?

deletesql: INSERT INTO AFDKMU(CODE,
AFDELINGKMU)

As I wrote before, before losing more time, you should know SQL and also, do
not play with more settings than you need to start with IBO.

MasterLinks and GeneratorLinks are very different things, please read the
IBO help. If you don't know what generators are, again, go to read LangRef
in the IB documentation. You can also read the FEATURES section at my site
(www.cvalde.com) where I try to enumerate all basic features of IB and what
they are.

C.

> -----Original Message-----
> From: Freddy Holst Christensen [mailto:freddy_holst_c@...]
> Sent: Domingo 15 de Abril de 2001 18:03
>
> Hey ALL
>
> I'm in the process of creating my first program with Interbase and IB
> Objects, and started with a simple table.
> But when I try to open the query, for editing and insert into the table,
> I'm having problems,
>
> I get the following message
>
> PROGRAM NAME raised an an Exception classEIB_ISCError with error
> message: ISC Error code 335544569
>
> ISC Error message
> Dynamic SQL Error
> SQL Error Code :-104
> Unexpected end of command
>
> Through the IB_Query's SQL Wizard, I have entered the following SQL
> statements
>
> On the SQL -tab
>
> SELECT *
> FROM AFDKMU
>
> On the UpdateSQL-tab
> editsql: UPDATE AFDKMU SET
> CODE = :CODE,
> AFDELINGKMU = :AFDELINGKMU
>
> insertsql: INSERT INTO AFDKMU(CODE,
> AFDELINGKMU)
>
> deletesql: INSERT INTO AFDKMU(CODE,
> AFDELINGKMU)
>
> Where code is an meant to be an ID generated with a generator through
> MasterLinks/GneratorLinks.
>
> Any help will very much appreciated, as I have spend much of
> today(Easter Sunday), searching for a Clue
>
>
> Regards
> Freddy
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>