cancel
Showing results for 
Search instead for 
Did you mean: 

Identity Column not being retrieve after Update()

Former Member
0 Kudos

I have a new DW in my app, that has an Identity Column set. It's set up like every other DW in my app with an Identity Column, with exactly the same sort of Firebird DB trigger to set its value (which I know is being called!). However, after the Update(), the column value is not being updated, unlike everwhere else in my app where that is working.

This is PB 11.5, with the Firebird DB as mentioned.

Any ideas what I could be missing? Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Now if only Sybase would get rid of the bug where virtually any edit to the SQL of a DW with an Identity Column set in the Update Properties caused the Identity Column setting to disappear! So annoying.

Former Member
0 Kudos

P.S. I added a Retrieve() call after the Update, to retrieve the row, and the identity column value is there. So clearly the update and the trigger to set the value are working fine, it's just the auto-setting of the Identity Column value after an Update that is failing. And yes, I absolutely have that column set as the Identity Column in the Update Properties of the DW. (Just like in the other DWs where it's working fine.)

former_member190719
Active Contributor
0 Kudos

The other DataWindows that are working are also talking to the same FireBird database?

What do you have in the PBODB115.INI file to tell it to get the value of the identity column?

Former Member
0 Kudos

Bruce, great questions! It's the same FB database for sure, but here's what I have in PBODB115.INI:

[Firebird]
PBSyntax='Firebird_SYNTAX'
PBNoCatalog='YES'

[Firebird_SYNTAX]
CreateTable='CREATE TABLE &TableName (::ColumnElement[::ColumnElement]...)'
ColumnElement='&ColumnName &DataType'
DropTable='DROP TABLE &TableName'
GetIdentity='Select gen_id(GEN_&TableName,0) from RDB$DATABASE'

That last line gives me the solution - I didn't name the generator for the new table that the DW was for according to the paradigm in that line, GEN_&TableName, I gave it a different name! I'm sure as soon as I fix that, it will work.

Thanks.