John,Attached are two things....some updated StrataFrame DLLs and a Link Manager sample. I ran into the problem you were encountering and I will explain it is just a minute. First let me explain how to update your DLLs:
Updating SF DLLs:
- Extract the SF DLLs to a temp folder
- Drag the DLLs into the c:\windows\assembly folder (GAC)
- Copy those same files to C:\Program Files\Common Files\MicroFour\StrataFrame
- Restart all Visual Studio Instances
This will update your SF DLLs.
The Problem
Your entire problem surrounds the TinyInt as your primary key. Your PKs were also autoincrementing which caused some additional side-effects. A TinyInt is converted to a Byte in .NET (you can find this in the SQL Server Books Online). The problem with this is that when a PK is auto-incrementing the framework will us negative numbers until the record is committed...obviously this won't work with a Byte since you cannot go below zero. There was an additional problem that we found while testing your scenario that is the reason we gave you the new DLLs. It has to do with a new record being added through a grid when there are already records populated within the Link Table in the BusinessLayerLinkManager while using TinyInt PKs. This issue has been resolved with these DLLs.
The Solution
You will notice that the business objects within the sample attached here have an alternate value returned on NULL. Since the framework cannot create the negative PK place holders for a TinyInt and DbNull value is returned which will cause a number of errors. To get around this, we set a Return Alternate Value on Null setting on each of the PKs to zero. See the customized field property value through the BO Mapper below:
Note: This needs to be done on each of the TinyInt PKs.
Since your PKs aure auto-incrementing, they will properly return the new PK once saved, but this just prevents the DbNull error from happening (since the PK could not be set to a negative value).
Past that I think the sample is pretty self-explanitory. Let me know if you have any other questions regarding this.