Changing Identifier in BCS Solution results in Deploying an External Content Type, Error:

After changing my my identifier in my BDC model from String to Guid, I tried to redeploy my solution from Visual Studio 2010.

Suddenly everything went wrong! I received all kinds of errors telling me that my BDC model was not compliant with the previous version… previous version? uhrm? was my previous version beeing cached???

this was not what I expected, because there was no BDC model stored in my BCS application and I've done multiple IISRESET commands…

But, I remembered that a SQL database was created when I created a new BCS service application. I opened this database and all the definitions from my previous BCS models (113 versions ) where in there…

This was the cache I've been looking for.

So there are 2 solutions to tackle this issue:

1) Delete the BCS service application from the central administration page and recreate it with a new SQL content database
2) Run the following script on your BCS database, in order to truncate all the data in there:

— disable all constraints
EXEC sp_msforeachtable “ALTER TABLE ? NOCHECK CONSTRAINT all”

— delete data in all tables
EXEC sp_MSForEachTable “DELETE FROM ?”

— enable all constraints
exec sp_msforeachtable “ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all”

I'm not sure if this is THE BEST SOLUTION and I wouldn't recommend it, but at this moment this was the only solution I could come up with …

If you have a better solution please let me know! Or reply here:
http://social.msdn.microsoft.com/Forums … c25e8d438d

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)