Subject Re: [IBO] Can somebody help me understand the following error message? Where do I've to look?
Author Tom Deprez
Ha!

Thanks! I didn't noticed this before. Must have overlooked it.
After not knowing what to do, I wrote the insert sql manually and then it worked. The strange thing was that it worked with another table having also two primary keys....

Looking further, the error only happens when you've a table with all fields as primary fields. Thus eg an n:n table which has two fields and both are primary keys will give this error.

(My other table had 3 fields... the primary key consists of the first 2 fields, the other is no primary field and therefor the wizard worked correctly.

Tom.
----- Original Message -----
From: Herbert Senner
To: IBObjects@yahoogroups.com
Sent: Friday, December 14, 2001 6:23 PM
Subject: AW: [IBO] Can somebody help me understand the following error message? Where do I've to look?


Your problem might be in the UpdateSQL.Statements. I think there is a bug in
creating the UpdateSQL- and the InsertSQL-Statement if there are two primary
keys in the related table. I get the same error with a table like this:
CREATE TABLE aTable ( FirstField INTEGER NOT NULL, SecondField INTEGER NOT
NULL);
ALTER TABLE aTable ADD PRIMARY KEY (FirstField, SecondField);
The result of generating the UpdateSQLs for this table is:
UPDATESQL:
UPDATE aTable SET
FirstField =:FirstField, /*PK*/
FirstField =:Secondfield, /*PK* <-- here are the faults with the comma
and the missing "/" after PK*
WHERE
FirstField = :OLD_ FirstField AND
SecondField = :OLD_ SecondField
INSERTSQL:
INSERT INTO aTable (
FirstField, /*PK*/
SecondField, /*PK*) <-- again: the comma is not allowed before ")" and
"/" is missing after PK*
VALUES (
: FirstField,
: SecondField)

Herbert

-----Ursprungliche Nachricht-----
Von: Tom Deprez [mailto:zifnabbe@...]
Gesendet: Freitag, 14. Dezember 2001 13:05
An: ibobjects@yahoogroups.com
Betreff: [IBO] Can somebody help me understand the following error message?
Where do I've to look?

ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Unexpected end of command

STATEMENT:
TIB_STATEMENT:

"<TApplication>.RegionForm.qrRegionPostcodes.IBOqrqrRegionPostcodes.<TIB_Upd
ateSQL>.<TIB_Statement>."

ST'. Process stopped. Use Step or Run to continue.

It is a query which contains the following code:

SELECT *
FROM VIEW_REGIONPOSTCODES P
WHERE P.REGION_ID = :REGION_ID

And I've used the 'Generate for table' button to create the UpdateSQL
statements...

Thanks in advance,
Tom.


___________________________________________________________________________
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/


Yahoo! Groups Sponsor
ADVERTISEMENT




___________________________________________________________________________
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 the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]