Public Shared ReadOnly Property ConnectionString() As String
Get
Return ConfigurationManager.AppSettings("ConnectionString")
End Get
End Property
Public Function GetDataSetGrd(ByVal strSQL As String) As DataSet
Dim ds As New DataSet
Try
ds = SqlHelper.ExecuteDataset(AppConfig.ConnectionString, _
CommandType.Text, strSQL)
Return ds
Exit Try
Catch ex As Exception
MessageBox.Show(ex.Message)
Return Nothing
Finally
If Not ds Is Nothing Then
ds.Dispose()
End If
End Try
End Function
ASKER
ASKER
Dim ds As DataSet
Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,
TRUSTED BY
Generally speaking, when you use dataadapter to create dataset object (using Fill method), if the connection was closed, it will close it after it has filled dataset. If it was opened, it would leave it opened. If this class uses internally dataadapter, then, as you already guessed, it will close it.
Goran