OpenDBConn:Cannot open database "niCHE" requested by the login. The login failed.

 


Unable to cast object of type 'System.String' to type 'System.Data.OleDb.OleDbConnection'.

Server Error in '/' Application.

Unable to cast object of type 'System.String' to type 'System.Data.OleDb.OleDbConnection'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Data.OleDb.OleDbConnection'.

Source Error:


Line 156:        presql="SET QUOTED_IDENTIFIER OFF;"
Line 157:
Line 158:        cmdSelect = New System.Data.OleDb.OleDbCommand(presql + sql, conn)
Line 159:        try    
Line 160:            dtrReader = cmdSelect.ExecuteReader()

Source File: C:\inetpub\wwwroot\niche\webroot\_smi\secure\functions.aspx    Line: 158

Stack Trace:


[InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Data.OleDb.OleDbConnection'.]
   ASP.au_boat_package_aspx.GetRS(Object conn, Object sql) in C:\inetpub\wwwroot\niche\webroot\_smi\secure\functions.aspx:158
   ASP.au_boat_package_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in C:\inetpub\wwwroot\niche\webroot\au\boat-package.aspx:42
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4676.0