Oracle, BusinessObjects & PrimaryKeyIsAutoIncremented on Update


Author
Message
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi,

noticed that when updating existing data the update fails
if the PrimaryKeyIsAutoIncremented is set to TRUE (=default (?)).

It's open to discussion if the default should be true or false, but in my opinion this shouldn't have effect when doing an update to data that already exists in the database....

Kari

Replies
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Ah yes, if the primary key is not a numeric data type, then it cannot be auto-incremented by the server.  You will need to manually assign a primary key to the record since the data type cannot be auto-incremented.
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: Forum Members
Posts: 65, Visits: 820
Hi,

yes, but when updating an existing record there is no need to increment anything....

"Cannot create UPDATE command because PrimaryKeyIsAutoIncremented = True and the PrimaryKeyField is not a valid auto-increment data type."

Kari

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You should not get this message when an UPDATE is called.  The only time this matters is when INSERTing a new record.  If you do not want the BO to auto-retrieve the PK on INSERTs then simply set the PrimaryKeyIsAutoIncrementing property to False on the BO.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search