We are randomly getting this error message on our development and
staging machines:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.; at
System.Data.Com mon.UnsafeNativ eMethods.OraMTS JoinTxn(OciEnli stContext
pCtxt, IDtcTransaction pTrans)
at
System.Data.Ora cleClient.Trace dNativeMethods. OraMTSJoinTxn(O ciEnlistContext
pCtxt, IDtcTransaction pTrans)
at System.Data.Ora cleClient.Oracl eInternalConnec tion.Enlist(Str ing
userName, String password, String serverName, Transaction transaction,
Boolean manualEnlistmen t)
at
System.Data.Ora cleClient.Oracl eInternalConnec tion.Activate(T ransaction
transaction)
at
System.Data.Pro viderBase.DbCon nectionInternal .ActivateConnec tion(Transactio n
transaction)
at
System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection
owningObject)
at
System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
owningConnectio n)
at
System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
outerConnection , DbConnectionFac tory connectionFacto ry)
at System.Data.Ora cleClient.Oracl eConnection.Ope n()
We are using VS2005, C#, Oracle 10g Client, and the TransactionScop e.
When we get this error, it's usually either on the opening of the
connection OR on the execution of the proc/package. We had to install
the client, then install, as a separate package the oracle support for
MTS which supports transactions.
Here is a snippet of code that causes this error:
using (TransactionSco pe scope = new TransactionScop e())
{
using (IDbConnection connection = this.GetConnect ion())
{
connection.Open ();
...DO SOME STUFF
try
{
command.Execute NonQuery();
foreach (IDataParameter parameter in command.Paramet ers)
{
if( parameter.Direc tion.Equals(
ParameterDirect ion.InputOutput ) || parameter.Direc tion.Equals(
ParameterDirect ion.Output ) )
returnParameter s.Add(parameter );
}
}
catch (Exception ex)
{
// ERROR HANDLING HERE
}
}
scope.Complete( );
}
Like I said, it happens randomly, but when it does occur, it's on one
of those two methods Open or Execute. Does anyone have any idea why
this breaks down
Thanks in advance for your help!
Sean 1 1978
Hi,
They don't come much worse than this do they?
As a test I suggest that you instantiate a new connection inside the method
rather than calling out for it.
FWIW
Bob
<OU*********@gm ail.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.com... We are randomly getting this error message on our development and staging machines:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.; at System.Data.Com mon.UnsafeNativ eMethods.OraMTS JoinTxn(OciEnli stContext pCtxt, IDtcTransaction pTrans) at
System.Data.Ora cleClient.Trace dNativeMethods. OraMTSJoinTxn(O ciEnlistContext pCtxt, IDtcTransaction pTrans) at System.Data.Ora cleClient.Oracl eInternalConnec tion.Enlist(Str ing userName, String password, String serverName, Transaction transaction, Boolean manualEnlistmen t) at System.Data.Ora cleClient.Oracl eInternalConnec tion.Activate(T ransaction transaction) at
System.Data.Pro viderBase.DbCon nectionInternal .ActivateConnec tion(Transactio n transaction) at System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection owningObject) at System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection owningConnectio n) at System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection outerConnection , DbConnectionFac tory connectionFacto ry) at System.Data.Ora cleClient.Oracl eConnection.Ope n()
We are using VS2005, C#, Oracle 10g Client, and the TransactionScop e. When we get this error, it's usually either on the opening of the connection OR on the execution of the proc/package. We had to install the client, then install, as a separate package the oracle support for MTS which supports transactions.
Here is a snippet of code that causes this error:
using (TransactionSco pe scope = new TransactionScop e()) { using (IDbConnection connection = this.GetConnect ion()) { connection.Open (); ...DO SOME STUFF try { command.Execute NonQuery(); foreach (IDataParameter parameter in command.Paramet ers) { if( parameter.Direc tion.Equals( ParameterDirect ion.InputOutput ) || parameter.Direc tion.Equals( ParameterDirect ion.Output ) ) returnParameter s.Add(parameter ); } } catch (Exception ex) { // ERROR HANDLING HERE } } scope.Complete( ); }
Like I said, it happens randomly, but when it does occur, it's on one of those two methods Open or Execute. Does anyone have any idea why this breaks down
Thanks in advance for your help!
Sean This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: hiralparikh |
last post by:
Hi,
I am using .NET 2.0 and trying to use a function from a native DLL
file.
Here is the syntax that I am using:
definition:
public static extern String getPwd(String strServerName, String
strUserId);
|
by: OUSoonerTaz |
last post by:
We are randomly getting this error message on our development and
staging machines:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.; at
System.Data.Common.UnsafeNativeMethods.OraMTSJoinTxn(OciEnlistContext
pCtxt, IDtcTransaction pTrans)
at
System.Data.OracleClient.TracedNativeMethods.OraMTSJoinTxn(OciEnlistContext
pCtxt, IDtcTransaction pTrans)
|
by: Seok Bee |
last post by:
Dear Experts,
I have created a script to extract the Event Logs from the system into an
excel sheet. The logs are separated into 2 worksheets (Application Log and
System Log). After this excel file being created, it will be sent out via
email to the list of recipients.
I run the script on my notebook (also developed on th same machine) it works
fine. However, when I copy all the programs into the server which running on
Windows 2000...
|
by: Ilkka |
last post by:
I have created an C++ application with Windows Forms, ADO and SQL server
2005. Now I need to change something and started debugging the code. Then
suddenly I receive an error.
"An unhandled exception of type 'System.AccessViolationException' occurred
in mscorlib.dll
Additional information: Attempted to read or write protected memory. This is
often an indication that other memory is corrupt."
The progran ends on a windows form designer...
|
by: Pieter |
last post by:
Hi,
Since 10 days (the first time was the 10th of november) I have some weird
exception happening in an application here:
All (except 1 of the total of 5) users had this error now 1 of 2 times
during the last 10 days. It happens mostly during startup or closing of the
application, but sometimes just in the middle of nowhere. It doesn't point
to anyting special. I don't get a clue...
It's a Windows Forms VB.NET 2005 application. I roll...
| |
by: deepakkumarb |
last post by:
I am getting this exception while executing non query from .NET code to oracle 10g DB.
Can you plz help
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
at System.Reflection.AssemblyName.nInit()
at...
|
by: adypoly |
last post by:
Hi guys...
I am having a typical problem in using one of the native dll in C#
I'll explain what am trying to do, I've a dll written in C language which i am trying to include in my C# project, the solutions builds fine but once i try to run the program it gives an exception as "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" I am passing two integer pointer variables as the...
|
by: =?Utf-8?B?UGFydGhpYmFu?= |
last post by:
We are doing a dataAdapter.fill(dataset) while reading data from oracle
databse. We are getting the following error randomly.
" Attempted to read or write protected memory. This is often an indication
that other memory is corrupt."
Note that we have migrated from .NET 1.1 to .NET 2.0 very recently and we
have been getting this error only after migration.
Can anyone please help us?
--
|
by: Scott Gravenhorst |
last post by:
Windows XP SP3
My application is set to open a SaveFile dialog when an exit is
requested. When I click the app's close button, the save dialog
opens, but when I click to change the folder, the exception occurs
pointing to FileSaveDialog1.ShowDialog(). The exception also
indicates some problem with system.drawing.dll.
The exception text is:
"Attempted to read or write protected memory. This is often an
|
by: sriram347 |
last post by:
Hi
I am a newbie to ASP.NET. I developed a web page (project type is web application) and I keep getting this error.
B]Error message :
"System.AccessViolation Exception attempted to read or write protected memory. this is often an indication that other memory is corrupt.... "
These are all the platform info :
Visual Studio 2005 (VB.NET) and ASP.NET 2.0.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |