M
Morten Snedker
Will this reader object ever be disposed properly?
Function MerchandiseStatus() As IDataReader
sb.Append(...)
Dim reader As IDataReader = Database.getDataReader(sb.ToString)
Return reader
reader.Close()
reader.Dispose()
End Function
If not, how is the proper way to have a function return an IDataReader
that is disposed after use? Should I build a class instead with a
dispose method?
/Regards
Function MerchandiseStatus() As IDataReader
sb.Append(...)
Dim reader As IDataReader = Database.getDataReader(sb.ToString)
Return reader
reader.Close()
reader.Dispose()
End Function
If not, how is the proper way to have a function return an IDataReader
that is disposed after use? Should I build a class instead with a
dispose method?
/Regards