I'm posting this so if someone else has this same issue they won't spend 4 days of debugging to figure out identity columns were not changing from -100 to a positive number when being saved to the table. Here's the situation:
Have a ibconfig file that has the following line:
<rdbKey name="default" databaseProduct="Unknown">
<connection>Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxxx;Data Source=yyyyy</connection>
<probeAssemblyName>Model</probeAssemblyName>
</rdbKey>
Notice that it's name is "default"
Then I had a IDataSourceKeyResolver like the following:
public IDataSourceKey GetKey(string pKeyName, string pKeyExtension)
{
ConnectionStringNew = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxxx;Data Source=xxxx\serverhere"
return new IdeaBlade.Rdb.RdbKey("Live", ConnectionStringNew);
}
Because the ibconfig file said "Default" and the IDataSourceKeyResolver said "Live" my SQL identities were not working properly and storing as negative (-) numbers.
When I changed the resolver to match the config file everything worked fine.
The hard part to debug this is that I added this line in to the getentities code
RdbKey
key = (RdbKey)mPersMgr.DataSourceResolver.GetDataSourceKey("Employee");
And when I created a watch on the key it would return looking like everything was ok. The dataprovider was set as SQL.
Just posting this so someone else with this issue won't have to go though the "Fun" I did!
Thanks