Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLEDB Recursive code eventually drops relational service 1

Status
Not open for further replies.

humour

Programmer
Nov 24, 2003
87
0
0

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

 

I forgot to mention I am using 9.6 client and engine.

 
I'm running 10 and VB.NET 2005 and I've gotten your code to run through over 1000 iterations (and still going).
ARe you seeing anything else other than the hang in your app? Does the PCC work when the app is hung?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top