J
Justin Lazanowski
Ok this one has me stumped. Everything looks right, but for whatever reason
the DataReader keeps telling me not set to an instance of an object. When I
step through the code, it runs the line
SqlDataReader mySqlReader;
However I can see in the watch value that the mySqlReader is set to an
undefined value
When it gets to the mySqlReader = sc.ExecuteReader() command I get the not
set error
Anyone have any thoughts?
Code below
<code>
int [] results;
results = new int[5];
SqlDataReader mySqlReader;
sc.Connection = sqlConn;
sc.CommandTimeout = 450;
try
{
sqlConn.Open();
mySqlReader = sc.ExecuteReader();
while(mySqlReader.Read())
</code>
the DataReader keeps telling me not set to an instance of an object. When I
step through the code, it runs the line
SqlDataReader mySqlReader;
However I can see in the watch value that the mySqlReader is set to an
undefined value
When it gets to the mySqlReader = sc.ExecuteReader() command I get the not
set error
Anyone have any thoughts?
Code below
<code>
int [] results;
results = new int[5];
SqlDataReader mySqlReader;
sc.Connection = sqlConn;
sc.CommandTimeout = 450;
try
{
sqlConn.Open();
mySqlReader = sc.ExecuteReader();
while(mySqlReader.Read())
</code>