- Jan 8, 2006
- 836
- 0
- 0
right now i am basically doing this:
i need to create several different sqlcommands and run them all on the same page. do i have to create a new connection, execute reader, and bind data every time? i know i can reuse the connection.
Code:
con1.Open();
cmdSelectLabs = new SqlCommand("my sql command", con1);
dataReaderLabs = cmdSelectLabs.ExecuteReader();
labView.DataSource = dataReaderLabs;
labView.DataBind();
dataReaderLabs.Close();
i need to create several different sqlcommands and run them all on the same page. do i have to create a new connection, execute reader, and bind data every time? i know i can reuse the connection.