c# - Exception querying table with dynamic columns from .NET application -
some time ago explained problem in question is "correct" database design?
basically, have relational db containing tables dynamic columns, don't have fixed structure of these tables , when try retrieve data them problematic.
now i'm developing web app point db , i'm using code execute query:
ienumerable<result> res = db.executequery<result>(@"select * entity_properties_1 entityid = {0}), entity.id);
but every time table structure changes error:
{"the ole db provider \"sqlncli10\" linked server \"data-db2\" reported change in schema version between compile time (\"178395762719197\") , run time (\"178408647621334\") table \"\"icrm_ca\".\"dbo\".\"entity_properties_1\"\"."}
how can solve problem?
if using synonym linked server's objects. run following code:
dbcc freeproccache
which removes cache entries.
Comments
Post a Comment