API
Version 7.x > API > CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue! View modes: 
User avatar
Member
Member
nqwebdev1 - 9/25/2012 4:35:01 PM
   
CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
I think this one is no longer working?! Can you please fix?

http://devnet.kentico.com/docs/devguide/index.html?data_layer_code_examples.htm

I have v7.0 and just migrated some codes from 7.0RC and the above example will generate an error and won't compile:

e.g.
SimpleDataClass theObj = new SimpleDataClass("cms.custom_table", 10);

SimpleDataClass userObj = new SimpleDataClass("cms.user", 10);

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 9/26/2012 3:58:08 AM
   
RE:CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
Hello,

as you can read in the note:
The code is used only for illustration. It's recommended that you use the CMS.SiteProvider.UserInfoProvider class for manipulation of the user data.

The SimpleDataClass was hidden from the public usage because it's for internal purposes of Kentico CMS.

The correct use is: IDataClass userObj = DataClassFactory.NewDataClass(...)

Please, don't use SimpleDataClass anymore, also the Documentation will be modified in the near time. Thank you for your understanding.

Best regards,
Martin Danko

User avatar
Member
Member
Accepted solutionAccepted solution
nqwebdev1 - 9/26/2012 2:06:24 PM
   
RE:CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
Hi Martin,

I've got it to working again now:
        blablaclass = new SimpleDataClass();
blablaclass.Init("norquest.courses");
blablaclass.LoadData(course_id);

If it's hidden from public then it shouldn't even be in the example documentation provided to public. Please modify the documentation. Thank you for your understanding.
kentico_martind2 wrote: Hello,
The SimpleDataClass was hidden from the public usage because it's for internal purposes of Kentico CMS.

Please, don't use SimpleDataClass anymore, also the Documentation will be modified in the near time. Thank you for your understanding.

Best regards,
Martin Danko

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 9/27/2012 2:13:37 AM
   
RE:CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
Hi,

Yes, the documentation is actually in the process of editing but there were several changes made from 7RC to 7.0 and technical writers haven't had enough time to correct everything. Please accept our apologies.

Thank you for letting us know about this inconsistency, we're working on it. I'm also glad that you found your own solution, good job!

Best regards,
Martin Danko

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 12/30/2012 11:06:45 PM
   
RE:CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
Thanks for the info Martin, this is helpful although still wonder why the documentation shows the SimpleDataClass information.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/31/2012 3:27:53 AM
   
RE:CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
Hi,

I've already informed our technical writers about this issue, so they will take a look at this and I hope that the documentation will be updated soon.

Best regards,
Martin Danko

User avatar
Member
Member
davids-kentico - 1/2/2013 4:38:43 AM
   
RE:CMS.DataEngine.SimpleDataClass constructor (from v6 to v7) issue!
This has been fixed months ago. I would suggest clearing your browser cache.