如何在vb.net中将NOCOUNT设置为ON

时间:2018-12-25 08:48:23

标签: sql vb.net oracle11g nocount

在应用程序中设置“ SET NOCOUNT ON”始终会提高应用程序的性能。但是,如何在VB.net项目的vb.net应用程序中设置它?这是我的代码

Dim myConn As OleDbConnection
Dim myAdapter As OleDbDataAdapter
Dim myDts As New DataSet
Dim strSql As String = "select * from table_issue"
myConn = New OleDbConnection(oldeb_connection_string)
myAdapter = New OleDbDataAdapter(strSql, myConn)
myAdapter.Fill(myDts,"table_issue")

1 个答案:

答案 0 :(得分:-1)

Dim strSql As String = "SET NOCOUNT OFF; select * from table_issue; SET NOCOUNT ON;"