Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

free the memory ?

3 posts in General Discussion (old) Last posting was on 2000-02-22 13:14:00.0Z
ALT Posted on 2000-02-21 10:23:33.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 21 Feb 2000 11:23:33 +0100
From: ALT <alt@impulsor.fr>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en,fr
MIME-Version: 1.0
Subject: free the memory ?
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Lines: 31
NNTP-Posting-Host: 212.155.127.189
Message-ID: <347_38B11225.D3603294@impulsor.fr>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28295
Article PK: 160333

Hello,

I have found a syntax to replace CreateCursor (i replace CreateCursor by

CreateQuery because CreateCursor don't free the memory) :

myConn = site.GetConnection ( "Compete_Connection" );

qu = myConn.CreateQuery("Select company.cd_company,
company.company_name from company");

if (qu != null)
{
// Process the retrieved data
psDocument.Write("Sélectionnez la société du contact : ");
psDocument.Write('<SELECT name=Company size=1
onfocus="contact_MAJ.contact_MAJ_cd_company.value=Company.value"
onchange="contact_MAJ.contact_MAJ_cd_company.value=Company.value">');
//psDocument.Write('<SELECT name=Company size=1
onchange="Document.contact_MAJ_cd_company.value=Company.value">');

while(qu.MoveNext())
{
psDocument.Write('<OPTION value="' + qu.GetValue(1) + '">' +
qu.GetValue(1) + " / " + qu.GetValue(2));
}

psDocument.Write('</SELECT></P>');

//qu.close();
}
else
{
psDocument.Write("Mauvaise Requete ");
}

Ok, it works.

But i want know if in this case the memory is free because qu.close();
doesn't work.

Have you any idea ?

thanks in advance
ALT
IMPULSOR


Dave Wolf [Sybase] Posted on 2000-02-22 02:07:12.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: free the memory ?
Date: Mon, 21 Feb 2000 21:07:12 -0500
Lines: 59
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 158.159.8.19
Message-ID: <347_q8JeMoNf$GA.333@forums.sybase.com>
References: <347_38B11225.D3603294@impulsor.fr>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28243
Article PK: 160286

If you can show CreateCursor is leaking, please open a case.

Dave Wolf
Internet Applications Division

ALT <alt@impulsor.fr> wrote in message news:38B11225.D3603294@impulsor.fr...
> Hello,
>
> I have found a syntax to replace CreateCursor (i replace CreateCursor by
>
> CreateQuery because CreateCursor don't free the memory) :
>
> myConn = site.GetConnection ( "Compete_Connection" );
>
> qu = myConn.CreateQuery("Select company.cd_company,
> company.company_name from company");
>
> if (qu != null)
> {
> // Process the retrieved data
> psDocument.Write("Sélectionnez la société du contact : ");
> psDocument.Write('<SELECT name=Company size=1
> onfocus="contact_MAJ.contact_MAJ_cd_company.value=Company.value"
> onchange="contact_MAJ.contact_MAJ_cd_company.value=Company.value">');
> file://psDocument.Write('<SELECT name=Company size=1
> onchange="Document.contact_MAJ_cd_company.value=Company.value">');
>
> while(qu.MoveNext())
> {
> psDocument.Write('<OPTION value="' + qu.GetValue(1) + '">' +
> qu.GetValue(1) + " / " + qu.GetValue(2));
> }
>
> psDocument.Write('</SELECT></P>');
>
> file://qu.close();
> }
> else
> {
> psDocument.Write("Mauvaise Requete ");
> }
>
> Ok, it works.
>
> But i want know if in this case the memory is free because qu.close();
> doesn't work.
>
> Have you any idea ?
>
> thanks in advance
> ALT
> IMPULSOR
>
>
>
>
>


ALT Posted on 2000-02-22 13:14:00.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 22 Feb 2000 14:14:00 +0100
From: ALT <alt@impulsor.fr>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en,fr
MIME-Version: 1.0
Subject: Re: free the memory ?
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Lines: 54
NNTP-Posting-Host: 212.155.127.189
Message-ID: <347_38B28B91.BFEF806B@impulsor.fr>
References: <347_38B11225.D3603294@impulsor.fr> <347_q8JeMoNf$GA.333@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28217
Article PK: 160092

We have a server with many internet sites. We have developped this sites with
powersite, powerdynamo and sql anywhere.

Ok but we have problem with the server. Often the server is out and we have this
error : "dynamic memory exhausted"

I have seen in the sybase documentation that :
this error come because CreateCursor don't free the memory.

Now i want replace Createcursor by Createquery because Createquery free the
memory and i want to know if my syntax was good ?

"Dave Wolf [Sybase]" wrote:

> If you can show CreateCursor is leaking, please open a case.
>
> Dave Wolf
> Internet Applications Division
>
> ALT <alt@impulsor.fr> wrote in message news:38B11225.D3603294@impulsor.fr...
> > Hello,
> >
> > I have found a syntax to replace CreateCursor (i replace CreateCursor by
> >
> > CreateQuery because CreateCursor don't free the memory) :
> >
> > myConn = site.GetConnection ( "Compete_Connection" );
> >
> > qu = myConn.CreateQuery("Select company.cd_company,
> > company.company_name from company");
> >
> > if (qu != null)
> > {
> > // Process the retrieved data
> > psDocument.Write("Sélectionnez la société du contact : ");
> > psDocument.Write('<SELECT name=Company size=1
> > onfocus="contact_MAJ.contact_MAJ_cd_company.value=Company.value"
> > onchange="contact_MAJ.contact_MAJ_cd_company.value=Company.value">');
> > file://psDocument.Write('<SELECT name=Company size=1
> > onchange="Document.contact_MAJ_cd_company.value=Company.value">');
> >
> > while(qu.MoveNext())
> > {
> > psDocument.Write('<OPTION value="' + qu.GetValue(1) + '">' +
> > qu.GetValue(1) + " / " + qu.GetValue(2));
> > }
> >
> > psDocument.Write('</SELECT></P>');
> >
> > file://qu.close();
> > }
> > else
> > {
> > psDocument.Write("Mauvaise Requete ");
> > }
> >
> > Ok, it works.
> >
> > But i want know if in this case the memory is free because qu.close();
> > doesn't work.
> >
> > Have you any idea ?
> >
> > thanks in advance
> > ALT
> > IMPULSOR
> >
> >
> >
> >
> >