Can you use 2 'using' statements for both sqlconnection and sqldatareader ?
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-04-12T16:16:12Z
Indexed on
2010/04/12
16:22 UTC
Read the original article
Hit count: 209
Can you use 2 'using' statements like:
using (SqlConnection ..)
{
using(SqlDataReader reader = new SqlDataReader())
{
}
}
I'm trying to do this put getting an error on the constructor of the SqlDataReader
© Stack Overflow or respective owner