Skip to content

Instantly share code, notes, and snippets.

@messboy
messboy / SQL
Created January 15, 2014 09:21
//聯繫SQL 處理多筆SQL查詢
private void getmutiquery()
{
string cmdtext = "select top 10 * from Orders; select top 11 * from Products";
using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString))
{
SqlCommand cmd = new SqlCommand(cmdtext, conn);
SqlDataReader dr = null;