M
Marius Horak
I have something like that
SqlCommand cmd = new SqlCommand(sqlText, connection);
SqlDataReader data = cmd.Execute();
while (data.Read())
{
...do my stuff
}
When sqlText is invalid the error does not occur on cmd.Execute (as I
would expect) but on data.Read().
Is it the correct DotNet behaviour or some stupid setup on my PC?
Thanks
MH
SqlCommand cmd = new SqlCommand(sqlText, connection);
SqlDataReader data = cmd.Execute();
while (data.Read())
{
...do my stuff
}
When sqlText is invalid the error does not occur on cmd.Execute (as I
would expect) but on data.Read().
Is it the correct DotNet behaviour or some stupid setup on my PC?
Thanks
MH