Hi guys
Ravikumar here
This is the erro iam not able to rectify, can any body help me for this.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 26: SqlDataAdapter da = new SqlDataAdapter(SQL, con);
Line 27: DataSet ds = new DataSet();
Line 28: da.Fill(ds);
Line 29: con.Close();
Line 30: ds.Dispose();
Source File: D:\Projects\Salford\DataControl.cs Line: 28
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
LoadLibraryW(UInt16* ) +0
System.EnterpriseServices.Thunk.Security.Init() +76
System.EnterpriseServices.Thunk.Security.SuspendIm personation() +81
System.EnterpriseServices.Platform.Initialize() +503
System.EnterpriseServices.ResourcePool..ctor(Trans actionEndDelegate cb) +11
System.Data.SqlClient.ConnectionPool..ctor(Default PoolControl ctrl) +797
System.Data.SqlClient.PoolManager.FindOrCreatePool (DefaultPoolControl ctrl) +170
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction) +358
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
DataControl.ExecuteQuery(String SQL) in D:\Projects\Salford\DataControl.cs:28
Salford.Register.LoadCourses() in D:\Projects\Salford\Register.aspx.cs:71
Salford.Register.Page_Load(Object sender, EventArgs e) in D:\Projects\Salford\Register.aspx.cs:62
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731