M
Michael
I'm trying to understand CommandBehavior.CloseConnection, used in this
context
conn.Open()
cmd = New SqlCommand(sql, conn)
rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Is that the exact same as if I had done this?
conn.Open()
cmd = New SqlCommand(sql, conn)
rdr = cmd.ExecuteReader()
conn.Close()
Thanks, and if there is anything else about this method that would be
helpful to know, I'd appreciate it!
--Michael
context
conn.Open()
cmd = New SqlCommand(sql, conn)
rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Is that the exact same as if I had done this?
conn.Open()
cmd = New SqlCommand(sql, conn)
rdr = cmd.ExecuteReader()
conn.Close()
Thanks, and if there is anything else about this method that would be
helpful to know, I'd appreciate it!
--Michael