L
Leon
Are dataset automatically stored in memory?
Does the dispose() method automatically dispose of the dataset in the code
below?
Do I have to dispose a dataset from memory or does the dataset dispose
itself when not in use?
I know I can use the clear method, but that just clear the data within
dataset not dispose of the dataset all together right?
*****Code Ex.
Public Overloads Function RetrievePersonalization(ByVal AccountID As
Integer) As DataRow
Dim parameters As SqlParameter() = { New SqlParameter("@AccountID",
SqlDbType.Int, 4)}
parameters(0).Value = AccountID
Dim Account As DataSet
Try
Account = RunProcedure( "GetStudentPersonalization", parameters, "Account")
Return Account.Tables(0).Rows(0)
Account.Dispose()
Finally
If Not Account Is Nothing Then
Account.Dispose()
End If
End Try
End Function
Does the dispose() method automatically dispose of the dataset in the code
below?
Do I have to dispose a dataset from memory or does the dataset dispose
itself when not in use?
I know I can use the clear method, but that just clear the data within
dataset not dispose of the dataset all together right?
*****Code Ex.
Public Overloads Function RetrievePersonalization(ByVal AccountID As
Integer) As DataRow
Dim parameters As SqlParameter() = { New SqlParameter("@AccountID",
SqlDbType.Int, 4)}
parameters(0).Value = AccountID
Dim Account As DataSet
Try
Account = RunProcedure( "GetStudentPersonalization", parameters, "Account")
Return Account.Tables(0).Rows(0)
Account.Dispose()
Finally
If Not Account Is Nothing Then
Account.Dispose()
End If
End Try
End Function