Trying to update a record I recieve the following error:"Cannot create UPDATE command because a business object with PrimaryKeyIsAutoIncremented = True must have exactly 1 primary key field"
This error makes sense since I have specified two keys for the table I'm updating. Now I'm not here to discuss the merits of combined keys (not my database design) I'd like to know how to best handle this situation. If I don't specify both fields as keys then the delete SP call does not send both fields. If I do set up two keys then I get the above error. And since the database is most definatly handling the field incrementing turning that off seems a bad idea. Is there an easy way around this or do I need to go hog tie our DBA? btw, if it matters this is Oracle (of course).
thanks
What I'd really like to know is why the SqlDataSourceItem.BuildUpdateCommand_SP includes logic that the Oracle version does not? Especially since that bit of logic if expressly preventing the duplication of the pk names.
Could it be an issue with the creation of the QueryInfo object? should QueryInfo.Fields normally contain the pk names in it? What about when PrimaryKeyIsAutoIncremented is set to false, would that change the construction of QueryInfo.Fields and add the PK names?
Thanks
That's a really good question. I think it's because when we added the functionality to allow users to change the primary key (a big no-no for most people, since it's a PK, but whatever), we made the change to the business layer to pass the pk fields as updatable fields, but the change just didn't get propagated to the OracleDataSourceItem.
Anyways, here's the update:
http://forum.strataframe.net/FindPost12485.aspx