http://forum.strataframe.net/FindPost12716.aspx
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
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
I'm thinking it has something to do with the PrimaryKeyFields property because the first iteration of the BuildUpdateCommand_SP should not include the PK fields, so they shouldn't be added twice.
I think I've tracked the composite key issue down to BuildUpdateCommand_SP in OracleDataSourceItem.vb
The SqlDataSourceItem.vb version of BuildUpdateCommand_SP has the following logic that I don't see in the Oracle version.
If Not QueryInfo.PrimaryKeyFieldIsAutoInc ThenloParam.ParameterName &= "_ORGPK"End If
The BuildUpdateCommand_SP is definatly building the SP with two copies of the primary keys when I define more than one in the BOM. One copy each for the values contained in the QueryInfo.Fields collection and one for the values QueryInfo.PrimaryKeyFields collection.
I'll build you an example project if you'd like.
Do a search of the forum for Oracle and you will find a lot fo threads where other developers have setup SPs for Oracle which may give you some ideas.
I do not beleive this is a bug, but I never like to rule anything out . It sounds to me that the sproc is not correct. Based on this thread alone there is not enough information to diagnose your problem. The first thing that I would do is turn on debugging for your data source:
This will show you what is being sent via the DAL to the database. You could then compare this to the actual SPROC to see what is going on. This is the first place I would look.