Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: "Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx>
- Date: Wed, 25 Apr 2007 17:25:56 -0400
You need to call dr.Close(); I don't know if that's what's causing your problem, but it's worth a try. I don't generally dispose of SqlCeCommand objects and often just reuse them, but you need to be sure to also call Close() on your connection when you are finished with it (which I believe calls Dispose internally.)
--
Ginny
"MoonBreaker" <Scharf.Rene@xxxxxxxxxxxxxx> wrote in message news:1176384810.166627.49480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Pete
I have not used dispose before (because cmd was an "Global"-Object in
Form1) but after your mail i tried it in this case:
cmd = new SqlCeCommand();
cmd.Connection = conEnceDB;
cmd.CommandText = sSqlString;
dr = cmd.ExecuteReader();
while (dr.Read())
{
.....
}
cmd.Dispose();
in every method I'm using cmd.
The error occours at the same time :-(
René
On 12 Apr., 10:10, "Pete Vickers [MVP]" <pete at gui - innovations dot
com> wrote:
Hi,
do you dispose of cmd when you have finished with it?
Pete
.
- Follow-Ups:
- Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: Rene Scharf
- Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: Rene Scharf
- Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: MoonBreaker
- Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- References:
- Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: MoonBreaker
- Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: Pete Vickers [MVP]
- Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- From: MoonBreaker
- Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- Prev by Date: Information_schema meta data
- Next by Date: Re: Information_schema meta data
- Previous by thread: Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- Next by thread: Re: Need realy help! Nobody there who knows a solution for my memory-error on WM5??
- Index(es):
Relevant Pages
|
Loading