humour
Programmer
- Nov 24, 2003
- 87
OLEDB Recursive code eventually drops relational service
I think this is what is happening.
I use vb.net
If I use oledb continuously opening, closing, connecting and destroying the Connection object my app eventually stops working. It seems the relational service stops working. After the app hangs even a simple singleton select from my vb.net application won't work.
The VB.Net Code and connection string I use is below. My code calls this function dozens of times in a loop.
ConnectString > "Provider=PervasiveOLEDB;Data Source=jj7;Location=bserver"
Public Function oledbGetDataSet(ByVal ConnectName As String, ByVal SQL As String) As DataSet
Dim ds As New DataSet
Dim conn As New OleDbConnection(Me.GetConnectionString(ConnectName))
conn.Open()
Dim adp As New OleDbDataAdapter(SQL, conn)
adp.Fill(ds)
conn.Close()
conn = Nothing
adp = Nothing
Return ds
End Function