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.

Visual Studio .NET 2005 - Visual Basic .NET - SQL AnyWhere 9 CE

5 posts in General Discussion Last posting was on 2006-01-04 16:11:13.0Z
MAP Posted on 2005-12-30 08:22:19.0Z
From: MAP <map@infaplic.es>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: es-es, es
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Visual Studio .NET 2005 - Visual Basic .NET - SQL AnyWhere 9 CE
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 80.224.1.155
Message-ID: <43b4ebb3@forums-2-dub>
X-Original-Trace: 30 Dec 2005 00:11:31 -0800, 80.224.1.155
Lines: 21
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 30 Dec 2005 00:11:31 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 30 Dec 2005 00:22:19 -0800
X-Trace: forums-1-dub 1135930939 10.22.108.75 (30 Dec 2005 00:22:19 -0800)
X-Original-Trace: 30 Dec 2005 00:22:19 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5098
Article PK: 17509

Hi all, i have to insert about 14000 rows in a table, with 20 columns,
the process inserts correctly 8192 rows and then shows an outofmemory error.

Is in the table one column varchar(100), if i don't insert this column
(accepts null), the process ends correctly.

Do you know what is the problem?

Thanks.

...
For lCont1 = 0 To lCont2 - 1
Me.ProgressBar1.Value = lCont1
sqlCommand = New AsaCommand("INSERT INTO ...", sqlConexion,
tTransaccion)
sqlCommand.ExecuteNonQuery()
Next
...

i've tried too with sqlcomman.commandtext = "insert..." and the same
error is shown.


Glenn Paulley Posted on 2005-12-30 14:41:23.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Visual Studio .NET 2005 - Visual Basic .NET - SQL AnyWhere 9 CE
From: Glenn Paulley <paulley@ianywhere.com>
References: <43b4ebb3@forums-2-dub>
Organization: iAnywhere Solutions
Message-ID: <Xns973C60BC7C138paulleyianywherecom@10.22.241.106>
User-Agent: Xnews/5.04.25
NNTP-Posting-Host: vpn-dub-093.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-093.sybase.com
Date: 30 Dec 2005 06:41:23 -0800
X-Trace: forums-1-dub 1135953683 10.22.120.93 (30 Dec 2005 06:41:23 -0800)
X-Original-Trace: 30 Dec 2005 06:41:23 -0800, vpn-dub-093.sybase.com
Lines: 53
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5100
Article PK: 8668

Which is the process running out of memory? Your application, or the SQL
Anywhere server?

What release and build of ASA 9 are you using?

What are your startup parameters for the server?

Do you have enough space on the device for the database file when the
VARCHAR column is inserted (this will take up 1.4Mb for the table pages
and equivalent space for the transaction log)?

Glenn

MAP <map@infaplic.es> wrote in news:43b4ebb3@forums-2-dub:

> Hi all, i have to insert about 14000 rows in a table, with 20 columns,
> the process inserts correctly 8192 rows and then shows an outofmemory
> error.
>
> Is in the table one column varchar(100), if i don't insert this column
> (accepts null), the process ends correctly.
>
> Do you know what is the problem?
>
> Thanks.
>
> ...
> For lCont1 = 0 To lCont2 - 1
> Me.ProgressBar1.Value = lCont1
> sqlCommand = New AsaCommand("INSERT INTO ...", sqlConexion,
> tTransaccion)
> sqlCommand.ExecuteNonQuery()
> Next
> ...
>
> i've tried too with sqlcomman.commandtext = "insert..." and the same
> error is shown.
>

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288


MAP Posted on 2006-01-03 10:06:43.0Z
From: MAP <map@infaplic.es>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: es-es, es
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Visual Studio .NET 2005 - Visual Basic .NET - SQL AnyWhere 9 CE
References: <43b4ebb3@forums-2-dub> <Xns973C60BC7C138paulleyianywherecom@10.22.241.106>
In-Reply-To: <Xns973C60BC7C138paulleyianywherecom@10.22.241.106>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 80.224.1.155
X-Original-NNTP-Posting-Host: 80.224.1.155
Message-ID: <43ba4cb3$1@forums-1-dub>
Date: 3 Jan 2006 02:06:43 -0800
X-Trace: forums-1-dub 1136282803 80.224.1.155 (3 Jan 2006 02:06:43 -0800)
X-Original-Trace: 3 Jan 2006 02:06:43 -0800, 80.224.1.155
Lines: 63
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5102
Article PK: 17508

It is a Visual Studio problem, if i only read the value without
inserting to database the program fails too.

This code shows outofmemoryexception when lcont1 is 8192.

Dim xNepigrafe As Xml.XmlNodeList
Dim sprueba As String

xNepigrafe = xml.SelectNodes("LECTURAS/PERIODO/LECTURAS/epigrafe")
lcont2 = xNepigrafe.Count

'Se van insertando los registros.
For lcont1 = 0 To lcont2 - 1
Me.ProgressBar1.Value = lcont1
sprueba = xNepigrafe.ItemOf(lcont1).InnerText
Next

Yes, it is incredible.

Glenn Paulley escribió:

> Which is the process running out of memory? Your application, or the SQL
> Anywhere server?
>
> What release and build of ASA 9 are you using?
>
> What are your startup parameters for the server?
>
> Do you have enough space on the device for the database file when the
> VARCHAR column is inserted (this will take up 1.4Mb for the table pages
> and equivalent space for the transaction log)?
>
> Glenn
>
> MAP <map@infaplic.es> wrote in news:43b4ebb3@forums-2-dub:
>
>
>>Hi all, i have to insert about 14000 rows in a table, with 20 columns,
>>the process inserts correctly 8192 rows and then shows an outofmemory
>>error.
>>
>>Is in the table one column varchar(100), if i don't insert this column
>>(accepts null), the process ends correctly.
>>
>>Do you know what is the problem?
>>
>>Thanks.
>>
>>...
>>For lCont1 = 0 To lCont2 - 1
>> Me.ProgressBar1.Value = lCont1
>> sqlCommand = New AsaCommand("INSERT INTO ...", sqlConexion,
>> tTransaccion)
>> sqlCommand.ExecuteNonQuery()
>>Next
>>...
>>
>>i've tried too with sqlcomman.commandtext = "insert..." and the same
>>error is shown.
>>
>
>
>
>


Glenn Paulley Posted on 2006-01-03 16:56:41.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Visual Studio .NET 2005 - Visual Basic .NET - SQL AnyWhere 9 CE
From: Glenn Paulley <paulley@ianywhere.com>
References: <43b4ebb3@forums-2-dub> <Xns973C60BC7C138paulleyianywherecom@10.22.241.106> <43ba4cb3$1@forums-1-dub>
Organization: iAnywhere Solutions
Message-ID: <Xns9740779B53181paulleyianywherecom@10.22.241.106>
User-Agent: Xnews/5.04.25
NNTP-Posting-Host: paulley-t41.sybase.com
X-Original-NNTP-Posting-Host: paulley-t41.sybase.com
Date: 3 Jan 2006 08:56:41 -0800
X-Trace: forums-1-dub 1136307401 10.25.99.149 (3 Jan 2006 08:56:41 -0800)
X-Original-Trace: 3 Jan 2006 08:56:41 -0800, paulley-t41.sybase.com
Lines: 85
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5103
Article PK: 8667

I'm not a VB guy. Perhaps someone else who follows this forum can help
you.

Glenn

MAP <map@infaplic.es> wrote in news:43ba4cb3$1@forums-1-dub:

> It is a Visual Studio problem, if i only read the value without
> inserting to database the program fails too.
>
> This code shows outofmemoryexception when lcont1 is 8192.
>
> Dim xNepigrafe As Xml.XmlNodeList
> Dim sprueba As String
>
> xNepigrafe = xml.SelectNodes("LECTURAS/PERIODO/LECTURAS/epigrafe")
> lcont2 = xNepigrafe.Count
>
> 'Se van insertando los registros.
> For lcont1 = 0 To lcont2 - 1
> Me.ProgressBar1.Value = lcont1
> sprueba = xNepigrafe.ItemOf(lcont1).InnerText
> Next
>
> Yes, it is incredible.
>
> Glenn Paulley escribió:
>> Which is the process running out of memory? Your application, or the
>> SQL Anywhere server?
>>
>> What release and build of ASA 9 are you using?
>>
>> What are your startup parameters for the server?
>>
>> Do you have enough space on the device for the database file when the
>> VARCHAR column is inserted (this will take up 1.4Mb for the table
>> pages and equivalent space for the transaction log)?
>>
>> Glenn
>>
>> MAP <map@infaplic.es> wrote in news:43b4ebb3@forums-2-dub:
>>
>>
>>>Hi all, i have to insert about 14000 rows in a table, with 20
>>>columns, the process inserts correctly 8192 rows and then shows an
>>>outofmemory error.
>>>
>>>Is in the table one column varchar(100), if i don't insert this
>>>column (accepts null), the process ends correctly.
>>>
>>>Do you know what is the problem?
>>>
>>>Thanks.
>>>
>>>...
>>>For lCont1 = 0 To lCont2 - 1
>>> Me.ProgressBar1.Value = lCont1
>>> sqlCommand = New AsaCommand("INSERT INTO ...", sqlConexion,
>>> tTransaccion)
>>> sqlCommand.ExecuteNonQuery()
>>>Next
>>>...
>>>
>>>i've tried too with sqlcomman.commandtext = "insert..." and the same
>>>error is shown.
>>>
>>
>>
>>
>>

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288


Nick Elson Posted on 2006-01-04 16:11:13.0Z
From: "Nick Elson" <no_span_nicelson@sybase.com>
Newsgroups: ianywhere.public.general
References: <43b4ebb3@forums-2-dub> <Xns973C60BC7C138paulleyianywherecom@10.22.241.106> <43ba4cb3$1@forums-1-dub> <Xns9740779B53181paulleyianywherecom@10.22.241.106>
Subject: Re: Visual Studio .NET 2005 - Visual Basic .NET - SQL AnyWhere 9 CE
Lines: 124
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: nicelson-m20.sybase.com
Message-ID: <43bbf0f6$1@forums-2-dub>
X-Original-Trace: 4 Jan 2006 07:59:50 -0800, nicelson-m20.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 4 Jan 2006 07:59:51 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 4 Jan 2006 08:11:13 -0800
X-Trace: forums-1-dub 1136391073 10.22.108.75 (4 Jan 2006 08:11:13 -0800)
X-Original-Trace: 4 Jan 2006 08:11:13 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5104
Article PK: 17510

I am not necessarily you VB.NET guy either but ....

. . . since it takes 8 thousand, 1 hundread and 92 iteratios to hit
this, it could just be you have just not given the .Net garbage collector
a chance to do some housekeeping. [the fact that the number
of iterations is a pure power of 2 and a common binary numer
is a tell that some intrinsic limit is being hit]

While, at first glance, it would seems to be a lot like a memory leak,
you should also note that you are implicitly instantiating numerous Item
and, more importantly, just as many String instances (with InnerText
method).

AND all of this is occuring in the same block [and never losing that scope].

The Java/C++ guru in me expects garbage collection to not occur
until those instances go out of scope.

You may be able to notify the garbage collector of your intentions by
adding a

sprueba = Nothing 'It would be null in
Java/C++

inside that loop (right after you are finished with it) or some other
.Net way to dereference instances.

Further you may be able to do more for the cause by forcing the garbage
collector to run periodically inside the loop [something non-Net MSBasic
used to require]. GC.Collect() comes to mind here.


HTH

"Glenn Paulley" <paulley@ianywhere.com> wrote in message
news:Xns9740779B53181paulleyianywherecom@10.22.241.106...
> I'm not a VB guy. Perhaps someone else who follows this forum can help
> you.
>
> Glenn
>
> MAP <map@infaplic.es> wrote in news:43ba4cb3$1@forums-1-dub:
>
>> It is a Visual Studio problem, if i only read the value without
>> inserting to database the program fails too.
>>
>> This code shows outofmemoryexception when lcont1 is 8192.
>>
>> Dim xNepigrafe As Xml.XmlNodeList
>> Dim sprueba As String
>>
>> xNepigrafe = xml.SelectNodes("LECTURAS/PERIODO/LECTURAS/epigrafe")
>> lcont2 = xNepigrafe.Count
>>
>> 'Se van insertando los registros.
>> For lcont1 = 0 To lcont2 - 1
>> Me.ProgressBar1.Value = lcont1
>> sprueba = xNepigrafe.ItemOf(lcont1).InnerText
>> Next
>>
>> Yes, it is incredible.
>>
>> Glenn Paulley escribió:
>>> Which is the process running out of memory? Your application, or the
>>> SQL Anywhere server?
>>>
>>> What release and build of ASA 9 are you using?
>>>
>>> What are your startup parameters for the server?
>>>
>>> Do you have enough space on the device for the database file when the
>>> VARCHAR column is inserted (this will take up 1.4Mb for the table
>>> pages and equivalent space for the transaction log)?
>>>
>>> Glenn
>>>
>>> MAP <map@infaplic.es> wrote in news:43b4ebb3@forums-2-dub:
>>>
>>>
>>>>Hi all, i have to insert about 14000 rows in a table, with 20
>>>>columns, the process inserts correctly 8192 rows and then shows an
>>>>outofmemory error.
>>>>
>>>>Is in the table one column varchar(100), if i don't insert this
>>>>column (accepts null), the process ends correctly.
>>>>
>>>>Do you know what is the problem?
>>>>
>>>>Thanks.
>>>>
>>>>...
>>>>For lCont1 = 0 To lCont2 - 1
>>>> Me.ProgressBar1.Value = lCont1
>>>> sqlCommand = New AsaCommand("INSERT INTO ...", sqlConexion,
>>>> tTransaccion)
>>>> sqlCommand.ExecuteNonQuery()
>>>>Next
>>>>...
>>>>
>>>>i've tried too with sqlcomman.commandtext = "insert..." and the same
>>>>error is shown.
>>>>
>>>
>>>
>>>
>>>
>
>
>
> --
> Glenn Paulley
> Research and Development Manager, Query Processing
> iAnywhere Solutions Engineering
>
> EBF's and Patches: http://downloads.sybase.com
> choose SQL Anywhere Studio >> change 'time frame' to all
>
> To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm
>
> SQL Anywhere Studio Supported Platforms and Support Status
> http://my.sybase.com/detail?id=1002288