System.Data.OleDb.OleDbException: System resource exceeded ERROR

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a loop to create instances of my user control at run time, for example:
for intPageCounter=0 to intNumberOfPages
dim objUser as new MyUserCtrl
objUser.getProducts()
Panel1.Controls.Add(objUser)
next
The method "getProducts" connect to Acces 2003 DB every time and get DataReader containing required data.

After a while this error message appeared:
System.Data.OleDb.OleDbException: System resource exceeded.

Please advice.
 
Hi,

You are not closing DataReaders or/and Connection instances.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

A. Moghazy said:
I have a loop to create instances of my user control at run time, for example:
for intPageCounter=0 to intNumberOfPages
dim objUser as new MyUserCtrl
objUser.getProducts()
Panel1.Controls.Add(objUser)
next
The method "getProducts" connect to Acces 2003 DB every time and get
DataReader containing required data.
 
Hi
I did
objReader.close(
objReader = nothin
objConn.close(
objConn = nothin

The error still exist
Note: in Windows Task Manager the "PF Usage" reachess 700 MB every time when this error occured.

----- Miha Markic [MVP C#] wrote: ----

Hi

You are not closing DataReaders or/and Connection instances

--
Miha Markic [MVP C#] - RightHand .NET consulting & software developmen
miha at rthand co
www.rthand.co

A. Moghazy said:
I have a loop to create instances of my user control at run time, fo example
for intPageCounter=0 to intNumberOfPage
dim objUser as new MyUserCtr
objUser.getProducts(
Panel1.Controls.Add(objUser
nex
The method "getProducts" connect to Acces 2003 DB every time and ge
DataReader containing required data
 
Hi,

What exactly does getProducts do?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

A. Moghazy said:
Hi,
I did.
objReader.close()
objReader = nothing
objConn.close()
objConn = nothing

The error still exist.
Note: in Windows Task Manager the "PF Usage" reachess 700 MB every time when this error occured.

----- Miha Markic [MVP C#] wrote: -----

Hi,

You are not closing DataReaders or/and Connection instances.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

A. Moghazy said:
I have a loop to create instances of my user control at run time,
for
example:
for intPageCounter=0 to intNumberOfPages
dim objUser as new MyUserCtrl
objUser.getProducts()
Panel1.Controls.Add(objUser)
next
The method "getProducts" connect to Acces 2003 DB every time and
get
DataReader containing required data.
System.Data.OleDb.OleDbException: System resource exceeded.
 
Back
Top