2009-12-23 81 views
6

我只是想驗證一些東西。我相信,如果我將使用命令應用於SqlDataReader,它可能會關閉數據讀取器並將其丟棄。例如:申請使用SqlDataReader

Using sdr As SqlDataReader = cm.ExecuteReader() 
    Dim someInt As Integer = sdr.GetInt32(0) 
    'other details and actions 
End Using 

威爾是關閉SDR SqlDataReader的它退出後使用代碼塊。 (我相信它會的,但只是想驗證。)

回答