Business object error when trying to use stored proc


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
When you configure a business object so that the PrimaryKeyIsAutoIncremented property is False, that _ORGPK value is used to find the record on the server since you could conceivably change the PK value (since it's not an IDENTITY field on the server).  So, yes, on your table that is using a non-integer, non-identity PK, you'll need to include the extra value in the parameters list.
Bradley Marston
Bradley Marston
StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)
Group: Forum Members
Posts: 24, Visits: 119
Thanks a lot for your help. That did the trick and the debug code you gave me is very useful. I have a follow up question though, I have a table with a varcharfield as a primarty key @Rese . when i look at the debug output i see a new parameter is created by strataframe @Rese_ORGPK. Will this always be the case that i have to add an extra parameter to my stored procs for this or is there a way to turn this off.

Thanks Brad

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Most likely, the business object needs to be configured to use an UpdateConcurrencyMode of RowVersion and the RowVersionOrTimestampColumn needs to be set to cust_Version.  The version field specified as an output parameter within the stored procedure and the business object needs to be configured to match.  Also, if that doesn't work, you can debug your data source.  At the bottom of the SetDataSources() method within the AppMain.vb file (or Program.cs), you can add this line to generate an HTML debug file of the data source:

MicroFour.StrataFrame.Data.DataBasics.DataSources("").SetDebugOn("C:\Debug.html", True)

Bradley Marston
Bradley Marston
StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)StrataFrame Novice (58 reputation)
Group: Forum Members
Posts: 24, Visits: 119
When i try to use a stored proc for updating a table. For example your

customers table using strataframes own Customers_Update , I receive the folowling error "Procedure or function Customers_Update has too many arguments specified."

Can somebody tell me why this is or at least how to try and debug it

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