c# - An object reference is required for the non-static field, method, or property 'TableManager.UpdateSystemFields' -
i got following error while upgrading kentico 9.0.
error1:
for updatesystemfields there an object reference required non-static field, method, or property 'tablemanager.updatesystemfields'
error2:
as in kentico api reference 9.0 'updatetablebydefinition' funtion showing removed.
bool old = tablemanager.updatesystemfields;// getting error1 tablemanager.updatesystemfields = true;// getting error1 string schema = forminfo.getxmldefinition(); tablemanager tm = new tablemanager(null); tm.updatetablebydefinition(dci.classtablename, schema);// getting error2 tablemanager.updatesystemfields = old;// getting error1
updatesystemfields not static member, can't access through type directly.
this not valid:
tablemanager.updatesystemfields
this valid:
tablemanager tm = new tablemanager("connectionstring"); bool old = tm.updatesystemfields;
Comments
Post a Comment