This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//聯繫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; |
NewerOlder