Groups | Blog | Home
all groups > vb.net > december 2007 >

vb.net : Unhandled exception


nyoussef
12/31/2007 6:07:01 AM
When I run below sample code I get the error message "attempted to read write
protected memory. This is often an indication that other memory is corrupt"
if the records reteived from the DB exceeds 300 or 400 records:

'VB libraries
Imports EX_MaDll

'System libraries
Imports System.IO
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Data.OracleClient

Public Class frm_EOD

(Truncated code)

Private Sub But_EncBills_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles But_EncBills.Click

(...Declaration)

ORC_Command1.CommandText = "SELECT BILL_NO
AS BILL_NO, CASE WHEN signature IS NULL THEN 'NULL'
ELSE signature END AS BILL_SIG, bill_amount
AS BILL_AMNT, CASE WHEN RUN_DATE IS NULL THEN 'NULL'
ELSE RUN_DATE END AS RUN_DATE, CASE WHEN key_ref IS NULL THEN 'NULL'
ELSE key_ref END AS KEY_REF, create_date
AS CREATE_DATE, drawee_Acct_no
AS RIB_TIRE FROM (SELECT BILL_NO, signature,
bill_amount, " & _
" RUN_DATE, " & _
" key_ref, " & _
" create_date, " & _
" drawee_Acct_no, rownum as NUMERO " & _
"FROM V_OUT_BILL " & _
"WHERE CODE_VALUE = 41)

ORC_Command1.Connection = db_Oracle_Conn
ORC_Command1.CommandType = CommandType.Text
Rs_Orc1 = ORC_Command1.ExecuteReader

While Rs_Orc1.Read()
Dim f_AuthentiferSignerLDC As New EX_MaDll.clsSub
ResignResult =
f_AuthentiferSignerLDC.AuthentifierSignerLDC(Path_Past_Key_Loop,
Path_Current_Key, Path_Local_CatPak + Bill_Num, Path_Local_CatPak + Bill_Num)
End While
Rs_Orc1.Close()
End Sub
nyoussef
12/31/2007 7:20:01 AM
When I monitor the memory with Windows Task Manager there's no excess use of
memory. Do you have any idea on how can I be sure that it's a memory problem
and how can I resolved it if it's the case?

[quoted text, click to view]
tomb
12/31/2007 9:45:51 AM
[quoted text, click to view]

It sounds to me like you're using up your available memory pool and the
Oracle is trying to invade other memory.

Cor Ligthert[MVP]
12/31/2007 3:44:52 PM
nouussef,

In your case I would ask this question in the newsgroup

news:\\microsoft.public.dotnet.framework.adonet

There are in my idea more guys active knowing from and helping with Oracle
and AdoNet than here.

It is obvious in your import.

Cor
AddThis Social Bookmark Button