D
Dotnet_Is_Love
I am getting frustrated with this.
I have a winform where I doing following:
form_load:
SqlConnection objConn = new SqlConnection("Server
=(local);Database=mydatabase;uid=sa;pwd=;");
objConn.Open ();
SqlDataAdapter da = new SqlDataAdapter ("Select * from
my_table",objConn );
DataTable dt = new DataTable ("");
da.Fill ( dt);
When I run this I get following exception:
An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object
I am not able to figure out the problem
I have a winform where I doing following:
form_load:
SqlConnection objConn = new SqlConnection("Server
=(local);Database=mydatabase;uid=sa;pwd=;");
objConn.Open ();
SqlDataAdapter da = new SqlDataAdapter ("Select * from
my_table",objConn );
DataTable dt = new DataTable ("");
da.Fill ( dt);
When I run this I get following exception:
An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object
I am not able to figure out the problem