My Oracle Support Banner

RDBPROD: Delete Via RdbCommandBuilder Fails With A Memory Error (Doc ID 1566932.1)

Last updated on AUGUST 12, 2016

Applies to:

Oracle Rdb Server on OpenVMS - Version to [Release 7.3]
Oracle Rdb Developer Tools for Visual Studio - Version to [Release 7.3]
Information in this document applies to any platform.


The following code fails:

public void Test()
  RdbDataAdapter da;
  int valueWhere =1;

  string cnxString = "Type=SQS;User Id=user;Password=pw;Server=node:GENERIC;Database=DISK$DATA:[USER]TEST.RDB;";
  RdbConnection conn = new RdbConnection(cnxString);

  string selectCmd = "SELECT id_value, valuef from table1 WHERE id_value = @PARAMETER1";

  RdbCommand cmd = new RdbCommand();
  cmd.CommandType = CommandType.Text;
  cmd.CommandText = selectCmd;
  cmd.Connection = conn;

  RdbParameter param = new RdbParameter("@PARAMETER1", DbType.Int32);
  param.Value = valueWhere;
  param.IsNullable = false;

  da = new RdbDataAdapter(cmd);
  DataSet ds = new DataSet();

  RdbCommandBuilder bldr = new RdbCommandBuilder(da);
  RdbTransaction trans = conn.BeginTransaction("READ WRITE");
  da.UpdateCommand.Transaction = trans;
  da.InsertCommand.Transaction = trans;
  da.DeleteCommand.Transaction = trans;
  catch (Exception ex)

The error message is:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.