G
Guest
I created a function to use DAAB return a datareader. The connection must
keep opening when I consume the datareader.
1. I tested the function, it works. Even I use the datareader after 10
seconds.
2. DAAB document said that it manages the connection.
3. From .NET programming point view, no guaranty for the connection opens.
Any suggestion?
Thanks.
------------------------------------------
Public Function GetDataReader(ByVal connectionStr As String, ByVal
sqlCommand As String) As IDataReader
Dim db As SqlDatabase = New SqlDatabase(connectionStr)
Dim dbCommand As DbCommand = db.GetSqlStringCommand(sqlCommand)
Return db.ExecuteReader(dbCommand)
End Function
keep opening when I consume the datareader.
1. I tested the function, it works. Even I use the datareader after 10
seconds.
2. DAAB document said that it manages the connection.
3. From .NET programming point view, no guaranty for the connection opens.
Any suggestion?
Thanks.
------------------------------------------
Public Function GetDataReader(ByVal connectionStr As String, ByVal
sqlCommand As String) As IDataReader
Dim db As SqlDatabase = New SqlDatabase(connectionStr)
Dim dbCommand As DbCommand = db.GetSqlStringCommand(sqlCommand)
Return db.ExecuteReader(dbCommand)
End Function