DNN DataProvider.Instance() error
Last Post 08/19/2016 9:18 AM by Joseph Craig. 7 Replies.
Author Messages
Eriol
Nuke Newbie
Nuke Newbie
Posts:6


--
02/26/2009 2:45 AM  
Good Day! I am beginner in DNN. I just wanted create new module using DNN COmpiled Module. Having started my project without Debugging and having registered as Host->SQL, DNN throws this Error-> Error: SQL is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: C:\dotnetnuke\DesktopModules\Admin\SQL\SQL.ascx.vb(97): error BC30456: 'Instance' is not a member of 'DataProvider'. ---> System.Web.HttpCompileException: C:\dotnetnuke\DesktopModules\Admin\SQL\SQL.ascx.vb(97): error BC30456: 'Instance' is not a member of 'DataProvider'. at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.ControlUtilites.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace --- What i can do? Thanks.
Eriol
Nuke Newbie
Nuke Newbie
Posts:6


--
02/26/2009 4:24 AM  
For normal functionning you must be sure that Partial class SQL inherits DotNetNuke.Entities.Modules.PortalModuleBase. It is first you must do.
Second - change DataProvider.Instance().ExecuteSql(....) with
Data.DataProvider.Instance().ExecuteSql(...) in line 97.

Don't forget to make change s in line 91:
Dim strError As String = Data.DataProvider.Instance().ExecuteScript(txtQuery.Text)

So, this theme could be closed.
Joseph Craig
DNN MVP
Posts:11667


--
02/26/2009 12:32 PM  
Thanks for your contribution!

Joe Craig, Patapsco Research Group
Complete DNN Support
Senthil
Nuke Newbie
Nuke Newbie
Posts:1


--
03/18/2009 8:08 AM  

Thank you very much Igna...

Keep posting
Vik
Nuker
Nuker
Posts:13


--
06/24/2010 9:14 AM  
I created my custom table in SQL DB and I would like to get data from it from Profile page and Login page. How do I do that? I can not use another Inherits on those pages. Could you please give me example of it? StrMyString = ....(Select ...) Execute?? Thank you.
Joseph Craig
DNN MVP
Posts:11667


--
06/27/2010 6:09 PM  
A very simplistic answer is that you will have to write code that does SQL selects to get data out of the existing tables, and then you will have to write that data into your tables.

If you could provide more details on what you are trying to do, that would help me in giving a better answer.

In general, though, copying data from one table and storing it in another table is considered to be bad design.  You only want to have data items stored in one place.  That's the whole rationale behind relational database models.  The data exists, and is connected to other data via relations.  So, what you would be storing in your tables should be indices that reference the actual data values.  If you do that, you'll not run into synchronization problems, and all data will always be current.

Joe Craig, Patapsco Research Group
Complete DNN Support
Paco Martinez
Nuke Newbie
Nuke Newbie
Posts:4


--
08/19/2016 5:10 AM  
Hi.

I am attemping to update from 5.6.8 to 6.0.0 and I get SAME error

Install.aspx.cs (71): error CS0117: 'DataProvider' does not contain a definition for 'Instance'

Source File: ....\Website\Install\Install.aspx.cs Line: 71

Line 71: string strProviderPath = DataProvider.Instance().GetProviderPath();

Is there any change critical in this version 6.0.0 ??

Thnks
Joseph Craig
DNN MVP
Posts:11667


--
08/19/2016 9:18 AM  
Try following the recommended upgrade path that is 5.6.8 to 6.2.8, instead of upgrading to 6.0.0.

Also, make sure that you "unblock" the upgrade zip file before extracting the upgrade files.

Joe Craig, Patapsco Research Group
Complete DNN Support


---