Subject Re: [IBO] Problems opening IBQuery
Author Helen Borrie
At 12:03 AM 16-04-01 +0200, you wrote:
>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


Start afresh.

First, identify the one or more columns in your SELECT query that uniquely identifies one row of the dataset (in a simple select, this will be the primary key of the underlying table).

Set the KeyLinks property of the dataset to be this column (or these columns, if the PK is composite).

Set RequestLive to true.

If the key is a generator and you plan to do INSERT operations on the dataset, set the GeneratorLinks property, e.g. CODE=MyGeneratorName.

Hook up to your control(s) via a TIB_Datasource.

Add buttons, UpdateBar or whatever you want to switch modes.

Now you are ready to go. You don't need the special update SQL statements unless you are doing something unusual.

Masterlinks isn't pertinent to a simple query. It is involved in master-detail relatonships.

Cheers,
Helen



All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________