Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ExecuteSQL not works in 4.3.7 and 4.4.0ExecuteSQL not works in 4.3.7 and 4.4.0
Previous
 
Next
New Post
1/22/2007 3:01 PM
 

Hi

On some reasons we still use in one place of our module this code

IDataReader dr = DotNetNuke.Data.DataProvider.Instance().ExecuteSQL(Query);

where Query is our SQL-query. Until versions 4.3.7 and 4.4.0 all was ok. But from version 4.3.7 appears error:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

[SqlException (0x80131904): Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734851
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +201
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText) +40
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +262
   CookDNN.DNN.Modules.UniversalList.Data.SqlDataProvider.GetTablesList() +94
   CookDNN.DNN.Modules.UniversalList.Business.ULController.GetTablesList() +35
   CookDNN.DNN.Modules.UniversalList.GetTables.DrawTables(String TableName) +57
   CookDNN.DNN.Modules.UniversalList.GetTables.DrawAction() +855
   CookDNN.DNN.Modules.UniversalList.GetTables.Page_Load(Object sender, EventArgs e) +28
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Will be glad to any help!

Thanks a lot!

 
New Post
1/22/2007 11:38 PM
 

thats an issue with user instances of sql express - typically it's caused when VWD or vs.net 2005 still have a connection to the database, or else you've failed to grant permissions. If you're using sql express in error, you'll need to change the two connection strings, otherwise see http://blog.krisvandermast.com/FailedToGenerateAUserInstanceOfSQLServerDueToAFailureInStartingTheProcessForTheUserInstanceTheConnectionWillBeClosed.aspx and http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=152338&SiteID=1 for common fixes.

Cathal

 


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/23/2007 4:51 AM
 

Cathal

Thank you very much for answer. Just read both articles. But i am using Win XP and tested on SQL 2000 and SQL Server 2005. Both have the same error.

How i try to replace Instance().ExecuteSQL(Query) to stored proc with EXEC. So who i confused, when i got error for module at all - no one SQL Method calls for both SQL 2000 or SQL 2005 :( Below is new error:

Error: UniversalList is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for 'CookDNN.DNN.Modules.UniversalList.Data.DataProvider' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CookDNN.DNN.Modules.UniversalList.Data.DataProvider' threw an exception. ---> System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey, Boolean UseCache) at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) at CookDNN.DNN.Modules.UniversalList.Data.DataProvider.CreateProvider() at CookDNN.DNN.Modules.UniversalList.Data.DataProvider..cctor() --- End of inner exception stack trace --- at CookDNN.DNN.Modules.UniversalList.Data.DataProvider.Instance() at CookDNN.DNN.Modules.UniversalList.Business.ULFieldsController.GetULFieldList() at CookDNN.DNN.Modules.UniversalList.Business.ULFieldsController.GetULFieldList(Int32 intPortalID) at CookDNN.DNN.Modules.UniversalList.UniversalList.FillHostPath() at CookDNN.DNN.Modules.UniversalList.UniversalList.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

Can be problem, that module was developed with VS 2003 for DNN 3.x and now converted for VS 2005 for DNN 4.x, but code not changed?

Thank you for all your help!

 
New Post
1/23/2007 8:01 AM
 
Cathal

Problem fixed. We replaced all calls Instance().ExecSQL with our new StoredProc. Stored Proc looks like:

CREATE PROCEDURE {databaseOwner}{objectQualifier}cDNN_UniversalList_ExecSQL
    @QueryText varchar(8000)
AS
    EXEC (@QueryText);
GO

And now we use this SP - all working fine. Hope this will help other developers.

Great Thanks Cathal For All Help!
 
New Post
1/23/2007 8:30 AM
 

In your dataprovider, if you have code such as this:

Private Shared Sub CreateProvider()CType(Framework.Reflection.CreateObject("data", "UniversalList", "UniversalList.dll"), DataProvider)

change it to:

Private Shared Sub CreateProvider()CType(Framework.Reflection.CreateObject("data", "UniversalList", ""), DataProvider)



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ExecuteSQL not works in 4.3.7 and 4.4.0ExecuteSQL not works in 4.3.7 and 4.4.0


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out