ado .net user's guide - raima

252
ADO.NET User Guide 1 Raima Database Manager 11.0 ADO.NET User Guide

Upload: others

Post on 09-Feb-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ADO .NET User's Guide - Raima

ADO.NET User Guide

1

Raima Database Manager 11.0

ADO.NET User Guide

Page 2: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 2

ContentsContents 2

Introduction 10

Basic ADO.NET Application Steps 10

Hello World! 11

Getting Started with ADO.NET 14

Registering the Raima.Rdm.dll 14

Command Line 14

Visual Studio GUI 15

Using DbProviderFactory 16

RdmCommand Class 20

RdmCommand() Constructor 22

RdmCommand(RdmConnection) Constructor 23

RdmCommand(string) Constructor 24

RdmCommand(string, RdmConnection) Constructor 25

IDbCommand.Connection Property 26

IDbCommand.CreateParameter() Method 27

IDbCommand.ExecuteReader() Method 28

ExecuteReader(CommandBehavior) Method 29

IDbCommand.Parameters Property 30

IDbCommand.Transaction Property 31

Cancel() Method 32

CreateParameter() Method 33

ExecuteNonQuery() Method 34

ExecuteReader() Method 35

ExecuteReader(CommandBehavior) Method 36

ExecuteScalar() Method 37

Prepare() Method 38

Page 3: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 3

CommandText Property 39

CommandTimeout Property 40

CommandType Property 41

Connection Property 42

Parameters Property 43

Transaction Property 44

UpdatedRowSource Property 45

RdmConnection Class 46

RdmConnection() Constructor 48

RdmConnection(string) Constructor 49

StateChange Event 50

IDbConnection.BeginTransaction() Method 51

IDbConnection.BeginTransaction(IsolationLevel) Method 52

IDbConnection.CreateCommand() Method 53

BeginTransaction() Method 54

BeginTransaction(IsolationLevel) Method 55

BeginTransaction(string) Method 56

BeginTransaction(string, IsolationLevel) Method 57

ChangeDatabase(string) Method 58

Close() Method 59

CreateCommand() Method 60

EnlistTransaction(Transaction) Method 61

GetSchema() Method 62

GetSchema(string) Method 63

GetSchema(string, string[]) Method 64

Open() Method 69

RdmConnectionStringBuilder Class 70

RdmConnectionStringBuilder() Constructor 72

RdmConnectionStringBuilder(string) Constructor 73

Page 4: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 4

Add(string, Object) Method 74

Clear() Method 75

ContainsKey(string) Method 76

EquivalentTo(DbConnectionStringBuilder) Method 77

Remove(string) Method 78

ShouldSerialize(string) Method 79

TryGetValue(string, out Object) Method 80

AutoCommit Property 81

BrowsableConnectionString Property 82

ConnectionString Property 83

Count Property 84

Database Property 85

DateFormat Property 86

DateSeparator Property 87

Host Property 88

IsFixedSize Property 89

IsReadOnly Property 90

Item Property 91

Keys Property 92

LockTimeout Property 93

OpenMode Property 94

Port Property 95

ReadOnlyTransactions Property 96

Values Property 97

RdmDataAdapter class 98

RdmDataAdapter() Constructor 100

RdmDataAdapter(RdmCommand) Constructor 101

RdmDataAdapter(string, RdmConnection) Constructor 102

RdmDataAdapter(string, string) Constructor 103

Page 5: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 5

RowUpdated Event 104

RowUpdating Event 105

IDbDataAdapter.DeleteCommand Property 106

IDbDataAdapter.InsertCommand Property 107

IDbDataAdapter.SelectCommand Property 108

IDataAdapter.TableMappings Property 109

IDbDataAdapter.UpdateCommand Property 110

Fill(DataSet) Method 111

Fill(DataTable) Method 112

Fill(DataSet, string) Method 113

Fill(int, int, DataTable[]) Method 114

Fill(DataSet, int, int, string) Method 115

FillSchema(DataSet, SchemaType) Method 117

FillSchema(DataTable, SchemaType) Method 118

FillSchema(DataSet, SchemaType, String) Method 119

GetFillParameters() Method 120

Update(DataRow[]) Method 121

Update(DataSet) Method 122

Update(DataTable) Method 123

Update(DataSet, String) Method 124

DeleteCommand Property 125

InsertCommand Property 126

SelectCommand Property 127

UpdateBatchSize Property 128

UpdateCommand Property 129

RdmDataReader Class 130

IDataRecord.GetData(int ordinal) Method 132

Close() Method 133

GetBoolean(int) Method 134

Page 6: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 6

GetByte(int) Method 135

GetBytes(int, long, byte[], int, int) Method 136

GetChar(int) Method 138

GetChars(int, long, char[], int, int) Method 139

GetData(int) Method 141

GetDataTypeName(int) Method 142

GetDateTime(int) Method 143

GetDecimal(int) Method 144

GetDouble(int) Method 145

GetEnumerator() Method 146

GetFieldType(int) Method 147

GetFloat(int) Method 148

GetGuid(int) Method 149

GetInt16(int) Method 150

GetInt32(int) Method 151

GetInt64(int) Method 152

GetName(int) Method 153

GetOrdinal(string) Method 154

GetProviderSpecificFieldType(int) Method 155

GetProviderSpecificValue(int) Method 156

GetProviderSpecificValues(Object[]) Method 157

GetSchemaTable() Method 158

GetString(int) Method 160

GetValue(int) Method 161

GetValues(Object[]) Method 162

IsDBNull(int) Method 163

NextResult() Method 164

Read() Method 165

Command Property 166

Page 7: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 7

Depth Property 167

FieldCount Property 168

HasRows Property 169

IsClosed Property 170

Item[int] Property 171

Item[string] Property 172

RecordsAffected Property 173

VisibleFieldCount Property 174

RdmParameter Class 175

RdmParameter() Constructor 177

RdmParameter(string, Object) Constructor 178

RdmParameter(string, RdmType) Constructor 179

IDbDataParameter.Precision Property 180

IDbDataParameter.Scale Property 181

ResetDbType() Method 182

ResetRdmType() Method 183

DbType Property 184

Direction Property 185

IsNullable Property 186

ParameterName Property 187

RdmType Property 188

Size Property 189

SourceColumn Property 190

SourceColumnNullMapping Property 191

SourceVersion Property 192

Value Property 193

RdmParameterCollection Class 194

IDataParameterCollection.Item[string] Property 196

IList.Item[int] Property 197

Page 8: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 8

Add(Object) Method 198

Add(RdmParameter) Method 199

AddRange(Array) Method 200

AddRange(RdmParameter[]) Method 201

Add(string, Object) Method 202

Add(string, RdmType) Method 203

Clear() Method 204

Contains(Object) Method 205

Contains(RdmParameter) Method 206

Contains(string) Method 207

CopyTo(Array, int) Method 208

CopyTo(RdmParameter[], int) Method 209

GetEnumerator() Method 210

IndexOf(Object) Method 211

IndexOf(RdmParameter) Method 212

IndexOf(string) Method 213

Insert(int, Object) Method 214

Insert(int, RdmParameter) Method 215

RemoveAt(int) Method 216

RemoveAt(string) Method 217

Remove(Object) Method 218

Remove(RdmParameter) Method 219

Count Property 220

IsFixedSize Property 221

IsReadOnly Property 222

IsSynchronized Property 223

Item[int] Property 224

Item[string] Property 225

SyncRoot Property 226

Page 9: ADO .NET User's Guide - Raima

ADO.NET User Guide

Contents 9

RdmRowUpdatedEventArgs Class 227

RdmRowUpdatedEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping) Con-structor 228

Command Property 229

RdmRowUpdatingEventArgs Class 230

RdmRowUpdatingEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping) Con-structor 231

Command Property 232

RdmTransaction Class 233

Commit() Method 234

Rollback() Method 235

Connection Property 236

IsolationLevel Property 237

RdmException Class 238

Procedure Property 239

SqlState Property 240

RdmDateFormat Enumeration 241

RdmType Enumeration 242

Glossary 243

Index 252

Page 10: ADO .NET User's Guide - Raima

ADO.NET User Guide

Introduction 10

IntroductionThe RDM database management system (DBMS) is designed to provide powerful, flexible, high-performance capabilities for developing embedded database applications. By combining the network and relational model technologies in a single system, RDM lets you organize and access information efficiently, regardless of the com-plexity of the data. The Native RDM C API provides an efficient low-level interface with a rich set of functionality.

The ADO.NET interface to RDM is designed to allow developers to access this powerful DBMS from ADO.NET and therefore from any application running in the CLR and from any .NET language.

This interface is an ADO.NET Data Provider and can integrate into the .NET DbProviderFactories ability or can be referenced directly. The following classes encompass the RDM Data Provider.

 l RdmConnection class l RdmConnectionStringBuilder Class l RdmCommand class l RdmDataReader class l RdmParameter class l RdmParameterCollection class l RdmDataAdapter class l RdmTransaction class l RdmException Class l RdmType enumeration l RdmDateFormat enumeration l RdmRowUpdatedEventArgs class l RdmRowUpdatingEventArgs class l RdmRowUpdatedEventHandler delegate l RdmRowUpdatingEventHandler delegate

Basic ADO.NET Application StepsAn ADO.NET C# application program consists of a set of calls to the ADO.NET API functions in a particular sequence as outlined below.

 1.  Set up and initialize your application’s use of the ADO.NET API as follows. a.  Create a String object to define your connection string in the following format: "host=l-

ocalhost;database=hello_worldADO" b.  Create an RdmConnection object to handle your connection to the Raima database system and 

pass in your connection string to the constructor. c.  Create an RdmCommand object to handle your SQL commands you wish to use to interact with the 

RDM database system. d.  Create an RdmTransaction object to handle your transactions within the RDM database system.

Page 11: ADO .NET User's Guide - Raima

ADO.NET User Guide

Introduction 11

 e.  Create an RdmDataReader object to handle reading out data from the RDM database system. f.  Call the Open function of the RdmConnection  object in order to open your database.

 2.  Prepare your application to execute SQL statements as follows. a.  Set the CommandText property of the RdmCommand object to define the SQL statement that will 

need to be executed by your application. b.  Create some RdmParameter  objects for any parameters you will need for any parameter markers 

that were specified in the SQL statements defined in the prior step. c.  Call the Parameters.Add(param) to bind your application’s variables to any parameters created in 

step b. 3.  At this point your application is execution ready. That means that your application will …

 a.  Call ExecuteNonQuery on the RdmCommand  object to execute the appropriate statements that implement the database access needs for each particular function. Alternatively you can call Execut-eScalar to execute a statement and return the first column of the first row of results.

 b.  Call transaction statements using the RdmTransaction class in order to start the transaction, com-mit the transaction, create a savepoint, or rollback a transaction.

 c.  Call ExecuteReader to retrieve the result rows from an executed select statement.  You iterate over the results using the RdmDataReader object.

 4.  When your application is ready to terminate you need to… a.  Call Close on the RdmDataReader object you used if you read from one. b.  Call Close on the RdmConnection  object to close the connection to your database.

Hello World!If you follow the basic procedure listed above you can easily create a simple database where you insert some data and the retrieve the data to be displayed back out. This can be seen with the common Hello World example.

In the example below return codes are mostly ignored for simplicity. This will be ok because we know what the expected results are.

/*********************************************************************

** HELLO WORLD ADO.NET

** ---------------

** This document describes the process to open a simple database, insert a rec-

ord

** containing a text field, read the text field from database and print it out.

**********************************************************************/

using System;

using Raima.Rdm; /* The RDM ADO.NET API */

using System.Data;

namespace HelloWorldApplication

{

class HelloWorld

{

Page 12: ADO .NET User's Guide - Raima

ADO.NET User Guide

Introduction 12

static void Main()

{

/* Setup connection and SQL query strings */

string connectionString =

"host=localhost;database=hello_worldADO";

string insertString = "INSERT INTO info(myChar) VALUES('Hello World!')

";

string queryString = "SELECT myChar FROM info";

/* Create connection object to connect to the database */

RdmConnection connection = new RdmConnection(connectionString)

/* Create a command object to call SQL queries */

RdmCommand command = connection.CreateCommand();

/* Create a transaction object to start and stop transactions */

RdmTransaction rdmtrans = null;

/* Create a reader object to read out data from the SQL query */

RdmDataReader reader = null;

try

{

/* Open a connection to the database */

connection.Open();

/* Start a transaction */

rdmtrans = connection.BeginTransaction();

/* Set the SQL query to the insert one */

command.CommandText = insertString;

/* Execute the query */

command.ExecuteNonQuery();

/* Commit the transaction */

rdmtrans.Commit();

/* Set the SQL query to the select one */

command.CommandText = queryString;

/* Execute a select statement which should return results */

reader = command.ExecuteReader();

/* Read all of the results */

while (reader.Read())

{

/* Print out each row of the select in a newline*/

Console.WriteLine(reader[0]);

}

/* Close the reader since retrieved all rows*/

reader.Close();

/* Close the connection */

connection.Close();

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

}

}

Page 13: ADO .NET User's Guide - Raima

ADO.NET User Guide

Introduction 13

}

}

Page 14: ADO .NET User's Guide - Raima

ADO.NET User Guide

Getting Started with ADO.NET 14

Getting Started with ADO.NETUsing the ADO.NET API requires a little bit of set up before you can get your application to compile and run cor-rectly. If you follow the steps below, you will be able to execute your application correctly in both the command line and Visual Studio GUI interfaces. There are also directions on using the DbProviderFactory class.

Registering the Raima.Rdm.dll 1.  Open a command prompt with Administrator permissions and navigate to the installation directory for the 

Raima product

 2.  Run gacutil /i Raima.Rdm.dll

Command Line 1.  Find the version of the .NET framework you have installed:

 a.  Run csc.exe from the command line and it should output something like:

Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1

 2.  Create your ADO.NET application. Look at Basic ADO.NET Application Steps for more information on this topic.

 3.  Find the location you installed the RDM product into. The ADO.NET dll provided should be at the

Page 15: ADO .NET User's Guide - Raima

ADO.NET User Guide

Getting Started with ADO.NET 15

install directory\Win32 or Win64\Raima.Rdm.dll

 4.  Compile your main class .cs file you have created above by using csc.exe "entry point .cs file" (i.e., csc.exe /r:"Install dll folder" HelloWorld_ADO_main.cs)

Visual Studio GUI 1.  Step 1: Create a new C# project by going to File->New->Project… This will go through a setup window 

for your new project. 2.  Select a C# project of any type and select Ok. 3.  On the right hand side, there will be a References folder.  You will need to add a reference to 

Raima.Rdm.dll there.  Do this by right clicking the References folder and selecting Add Reference…

 4.  Click the Browse tab and navigate to your installation directory then select Raima.Rdm.dll

Page 16: ADO .NET User's Guide - Raima

ADO.NET User Guide

Getting Started with ADO.NET 16

 5.  Click Ok and you are now ready to use the Raima ADO.NET provider in  your project.

Using DbProviderFactory 1.  If you wish to use the DbProviderFactory object to get access to the Raima ADO.NET provider then you 

will first need to find out the version of the .NET framework you are using by following the steps in step 1 of the command line section.

 2.  Navigate to that folder in your Windows directory.

Page 17: ADO .NET User's Guide - Raima

ADO.NET User Guide

Getting Started with ADO.NET 17

 3.  Go into the folder for the version you are using and then into the Config folder there.

Page 18: ADO .NET User's Guide - Raima

ADO.NET User Guide

Getting Started with ADO.NET 18

 4.  Open the machine.config file. On Windows 7, you will need to do so with notepad and Administrator access.

 5.  Find the <DbProviderFactories> section and add the following entry:

<add name="Raima RDM Embedded Data Provider" invariant="Raima.Rdm"

description=".NET Framework Data Provider for RDM" type="Raima.Rdm.Rd-

mProviderFactory,

Raima.Rdm, Version=11.0.1000.0, Culture=neutral, Pub-

licKeyToken=23f692695ad03bb6"/>

Page 19: ADO .NET User's Guide - Raima

ADO.NET User Guide

Getting Started with ADO.NET 19

 6. 

Page 20: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 20

RdmCommand ClassDescription:

The RdmCommand class, derived from DbConnection, encapsulates all of the information to perform any SQL command, such as an INSERT, a DELETE, an UPDATE, a SELECT, etc. An RdmCommand object can be created by directly calling the constructor or via the generic DbProviderFactory.CreateCommand() method.

Public Constructors:

 l RdmCommand() l RdmCommand(RdmConnection connection) l RdmCommand(string commandText) l RdmCommand(string commandText, RdmConnection connection)

Public Properties:

 l CommandText { get; set; } l CommandTimeout { get; set; } l CommandType { get; set; } l Connection { get; set; } l Container { get; }   (Inherited from Component) l DesignTimeVisible { get; set; }  (Inherited from Component) l Parameters { get; } l Site { get; set; }   (Inherited from Component) l Transaction { get; set; } l UpdatedRowSource { get; set; }

Public Methods:

 l Cancel() l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l CreateParameter() l Dispose()   (Inherited from Component) l Equals(Object other)   (Inherited from Object) l ExecuteNonQuery() l ExecuteReader() l ExecuteReader(CommandBehavior) l ExecuteScalar() l GetHashCode()   (Inherited from Object)

Page 21: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 21

 l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetType()   (Inherited from Object) l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l Prepare() l ToString()   (Inherited from Component)

Public Events:

 l Disposed   (Inherited from Component)

Explicit Interface Implementations:

 l IDbConnection IDbCommand.Connection { get; set; } l IDbDataParameter IDbCommand.CreateParameter() l IDataReader IDbCommand.ExecuteReader() l IDataReader IDbCommand.ExecuteReader(CommandBehavior) l IDataParameters IDbCommand.Parameters { get; } l IDbTransaction IDbCommand.Transaction { get; set; }

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection

Page 22: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 22

RdmCommand() Constructor

Syntax:

public RdmCommand()

Description:

The default constructor for the RdmCommand class. Specifying a new RdmCommand object with this constructor generates a new command object with an empty CommandText and with new RdmCommand not being asso-ciated with any connection. An association with an RdmConnection needs to be made before the new com-mand object can be used.

Page 23: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 23

RdmCommand(RdmConnection) Constructor

Syntax:

public RdmCommand(RdmConnection connection)

Description:

A constructor for the RdmCommand class. Specifying a new RdmCommand object with this constructor generates a new command object with an empty CommandText and with new RdmCommand not being associated with any connection. An association with an RdmConnection needs to be made before the new command object can be used.

Parameters:

connection

Type: System.String

Specifies the command text to use for this command.

Page 24: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 24

RdmCommand(string) Constructor

Syntax:

public RdmCommand(string commandText)

Description:

A constructor for the RdmCommand class. Specifying a new RdmCommand object with this constructor generates a new command object with an empty CommandText and with new RdmCommand not being associated with any connection. An association with an RdmConnection needs to be made before the new command object can be used.

Parameters:

connection

Type: System.String

Specifies the command text to use for this command.

Page 25: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 25

RdmCommand(string, RdmConnection) Constructor

Syntax:

public RdmCommand(String commandText, RdmConnection connection)

Description:

A constructor for the RdmCommand class. Specifying a new RdmCommand object with this constructor generates a new command object with an empty CommandText and with new RdmCommand not being associated with any connection. An association with an RdmConnection needs to be made before the new command object can be used.

Parameters:

connection

Type: System.String

Specifies the command text to use for this command.

Page 26: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 26

IDbCommand.Connection Property

Syntax:

IDbConnection IDbCommand.Connection { get; set; }

Description:

Type: System.Data.IDbConnection

Gets or sets the connection with which this command is associated.

This property is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.Connection

Page 27: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 27

IDbCommand.CreateParameter() Method

Syntax:

IDbDataParameter IDbCommand.CreateParameter()

Description:

Creates a new instance of an RdmParameter object.

This method is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Return Value:

Type: System.Data.IDbDataParameter

The new RdmParameter object.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.CreateParameter

Page 28: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 28

IDbCommand.ExecuteReader() Method

Syntax:

IDataReader IDbCommand.ExecuteReader()

Description:

Executes the CommandText, returning the result set in an RdmDataReader.

This method is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Return Value:

Type: System.Data.IDataReader

An RdmDataReader used to retrieve the results.

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.ExecuteReader

Page 29: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 29

ExecuteReader(CommandBehavior) Method

Syntax:

IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior)

Description:

Executes the CommandText using the specified behavior, returning the result set in an RdmDataReader.

This method is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Parameters:

behavior

Type: System.Data.CommandBehavior

Specifies the particular behavior for executing the command.

Return Value:

Type: System.Data.IDataReader

An RdmDataReader used to retrieve the results.

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.ExecuteReader(Com-mandBehavior)

Page 30: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 30

IDbCommand.Parameters Property

Syntax:

IDataParameterCollection IDbCommand.Parameters { get; }

Description:

Type: IDataParameterCollection

Gets the collection of RdmParameter objects associated with this command.

This property is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.Parameters

Page 31: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 31

IDbCommand.Transaction Property

Syntax:

IDbTransaction IDbCommand.Transaction { get; set; }

Description:

Type: System.Data.IDbTransaction

Gets or sets the transaction within which the command object executes. Attempting to set the transaction throws an exception. The proper way to add a command to a transaction is to create the transaction at the connection level which will automatically put all associated commands into the transaction.

This property is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Exceptions:

Exception ConditionArgumentNullException The specified transaction is null.ArgumentException The specified transaction is not a valid RdmTransaction.InvalidOperationException Attempted to set the transaction

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.Transaction

Page 32: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 32

Cancel() Method

Syntax:

public void Cancel()

Description:

Attempts to cancel the execution of the current command. This does nothing in the RDM.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbCommand.Cancel()

Page 33: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 33

CreateParameter() Method

Syntax:

public RdmParameter CreateParameter()

Description:

Creates a new instance of an RdmParameter object.

Return Value:

Type: RdmParameter

The new RdmParameter object.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbCommand.CreateParameter

Page 34: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 34

ExecuteNonQuery() Method

Syntax:

public int ExecuteNonQuery()

Description:

Executes the CommandText with no result set returned.

Return Value:

Type: System.Int32

The number of rows affected.

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbCommand.ExecuteNonQuery()

Page 35: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 35

ExecuteReader() Method

Syntax:

public RdmDataReader ExecuteReader()

Description:

Executes the CommandText, returning the result set in an RdmDataReader.

Return Value:

Type: RdmDataReader

An RdmDataReader used to retrieve the results.

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbCommand.ExecuteReader()

Page 36: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 36

ExecuteReader(CommandBehavior) Method

Syntax:

public RdmDataReader ExecuteReader(CommandBehavior behavior)

Description:

Executes the CommandText using the specified behavior, returning the result set in an RdmDataReader.

Parameters:

behavior

Type: System.Data.CommandBehavior

Specifies the particular behavior for executing the command.

Return Value:

Type: RdmDataReader

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbCommand.ExecuteReader(CommandBehavior)

Page 37: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 37

ExecuteScalar() Method

Syntax:

public object ExecuteScalar()

Description:

Executes the CommandText, returning the result first column of the first row of the results.

Return Value:

Type: System.Object

The first column of the first row of the results of the query

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbCommand.ExecuteScalarl()

Page 38: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 38

Prepare() Method

Syntax:

public void Prepare()

Description:

Creates a prepared version of the command on the data source. This can then be executed multiple times to avoid the preparation cost over and over.

Exceptions:

Exception ConditionRdmException The SQL engine encountered an error processing the command.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbCommand.Prepare()

Page 39: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 39

CommandText Property

Syntax:

public string CommandText { get; set; }

Description:

Type: System.String

Exceptions:

None

Page 40: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 40

CommandTimeout Property

Syntax:

public string CommandTimeout{ get; set; }

Description:

Type: System.Int32

Exceptions:

None

Page 41: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 41

CommandType Property

Syntax:

public CommandType CommandType { get; set; }

Description:

Type: System.Data.CommandType

Exceptions:

None

Page 42: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 42

Connection Property

Syntax:

public RdmConnection Connection { get; set; }

Description:

Type: RdmConnection

Exceptions:

None

Page 43: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 43

Parameters Property

Syntax:

public RdmParameterCollection Parameters { get; }

Description:

Type: RdmParameterCollection

Exceptions:

None

Page 44: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 44

Transaction Property

Syntax:

public RdmTransaction Transaction { get; set; }

Description:

Type: RdmTransaction

Exceptions:

None

Page 45: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmCommand Class 45

UpdatedRowSource Property

Syntax:

public UpdateRowSource UpdatedRowSource{ get; set; }

Description:

Type: System.Data.UpdateRowSource

Exceptions:

None

Page 46: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 46

RdmConnection ClassDescription:

The RdmConnection class, derived from DbConnection, encapsulates all of the information to connect to a par-ticular database, including all settings particular to that database. An RdmConnection object can be created by directly calling the constructor or via the generic DbProviderFactory.CreateConnection() method.

Public Constructors:

 l RdmConnection() l RdmConnection(string connectionString)

Public Properties:

 l AutoCommit { get; set; } l ConnectionString { get; set; } l ConnectionTimeout { get; set; } l Container { get; }   (Inherited from Component) l Database { get; } l DataSource { get; } l DateFormat { get; set; } l DateSeparator { get; set; } l LockTimeout { get; set; } l OpenMode { get; set; } l ServerVersion { get; } l Site { get; set; }   (Inherited from Component) l State { get; set; }

Public Methods:

 l BeginTransaction() l BeginTransaction(IsolationLevel isolationLevel) l BeginTransaction(string transactionName) l BeginTransaction(string transactionName, IsolationLevel isolationLevel) l ChangeDatabase(string databaseName) l Close() l CreateCommand() l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l Dispose()   (Inherited from Component)

Page 47: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 47

 l EnlistTransaction(Transaction transaction) l Equals(Object other)   (Inherited from Object) l GetHashCode()   (Inherited from Object) l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetSchema() l GetSchema(string collectionName) l GetSchema(string collectionName, string[] restrictionValues) l GetType()   (Inherited from Object) l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l Open() l ToString()   (Inherited from Component)

Public Events:

 l Disposed   (Inherited from Component) l StateChange

Explicit Interface Implementations:

 l IDbConnection.BeginTransaction() l IDbConnection.BeginTransaction(IsolationLevel isolationLevel) l IDbConnection.CreateCommand()

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection

Page 48: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 48

RdmConnection() ConstructorSyntax:

public RdmConnection()

Description:

The default constructor for the RdmConnection class. Specifying a new RdmConnection object with this con-structor generates a new connection object with an empty ConnectionString.

Parameters:

None

Exceptions:

None

Page 49: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 49

RdmConnection(string) Constructor

Syntax:

public RdmConnection(string connectionString)

Description:

A constructor for the RdmConnection class. Specifying a new RdmConnection object with this constructor gen-erates a new connection object with the specified string. See the ConnectionString property for valid connection string syntax.

Parameters:

connectionString

Type: System.String

Specifies the connection string to use for connecting to the database.

Exceptions:

Exception ConditionArgumentException One or more parts do not follow the <key>=<value> format.ArgumentException The key specified is not recognized.ArgumentException The value is not appropriate for the specified key.OverflowException The value was expected to be a number but was too large or small for an

Int32.FormatException The value was expected to be numeric but was not a valid number

Page 50: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 50

StateChange Event

Syntax:

public event StateChangeEventHandler StateChange

Description:

Type: System.Data.StateChangeEventHandler

The StateChange event occurs when the state of connection changes from Closed to Opened or Opened to Closed.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnection.StateChange

Page 51: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 51

IDbConnection.BeginTransaction() Method

Syntax:

IDbTransaction IDbConnection.BeginTransaction()

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be committed or discarded all together. There can only be one transaction active per connection.

This method creates a transaction with a system generated name and the default isolation level (Iso-lationLevel.Serializable).

This method is an explicit interface member implementation and can only be used when the RdmConnection instance is cast to an IDbConnection interface.

Return Value:

Type: IDbTransaction

Exceptions:

Exception ConditionInvalidOperationException The connection is closed.InvalidOperationException A transaction is already in progress.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbConnection.BeginTransaction

Page 52: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 52

IDbConnection.BeginTransaction(IsolationLevel) Method

Syntax:

IDbTransaction IDbConnection.BeginTransaction(IsolationLevel isolationLevel)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be committed or discarded all together. There can only be one transaction active per connection.

This method creates a transaction with a system generated name and the specified isolation level.

This method is an explicit interface member implementation and can only be used when the RdmConnection instance is cast to an IDbConnection interface.

Parameters:

isolationLevel

Type: System.Data.IsolationLevel

Specifies the isolation level for the transaction.  The RDM Data Adapter directly supports the Iso-lationLevel.Serializable and Isolation.Snapshot isolation levels.  All other iso-lation levels will be silently mapped to IsolationLevel.Serializable.

Return Value:

Type: IDbTransaction

Exceptions:

Exception ConditionInvalidOperationException The connection is closed.InvalidOperationException A transaction is already in progress.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbConnection.BeginTransaction

Page 53: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 53

IDbConnection.CreateCommand() Method

Syntax:

IDbCommand IDbConnection.CreateCommand()

Description:

Creates a new RdmCommand object associated with the current connection.

This method is an explicit interface member implementation and can only be used when the RdmConnection instance is cast to an IDbConnection interface.

Return Value:

System.Data.IDbCommand

Reference:

For more information, reference MSDN documentation for: System.Data.IDbConnection.CreateCommand

Page 54: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 54

BeginTransaction() Method

Syntax:

public RdmTransaction BeginTransaction()

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be committed or discarded all together. There can only be one transaction active per connection.

This method creates a transaction with a system generated name and the default isolation level (Iso-lationLevel.Serializable).

Parameters:

None

Return Value:

Type: RdmTransaction

Exceptions:

Exception ConditionInvalidOperationException The connection is closed.InvalidOperationException A transaction is already in progress.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnection.BeginTransaction

Page 55: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 55

BeginTransaction(IsolationLevel) Method

Syntax:

public RdmTransaction BeginTransaction(IsolationLevel isolationLevel)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be committed or discarded all together. There can only be one transaction active per connection.

This method creates a transaction with a system generated name and the specified isolation level.

Parameters:

isolationLevel

Type: System.Data.IsolationLevel

Specifies the isolation level for the transaction.  The RDM Data Adapter directly supports the Iso-lationLevel.Serializable and Isolation.Snapshot isolation levels.  All other isolation levels will be silently mapped to IsolationLevel.Serializable.

Return Value:

Type: RdmTransaction

Exceptions:

Exception ConditionInvalidOperationException The connection is closed.InvalidOperationException A transaction is already in progress.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnection.BeginTransaction

Page 56: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 56

BeginTransaction(string) Method

Syntax:

public RdmTransaction BeginTransaction(String transactionName)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be committed or discarded all together. There can only be one transaction active per connection.

This method creates a transaction with the specified transaction name and the default isolation level (Iso-lationLevel.Serializable).

Parameters:

transactionName

Type: System.String

Specifies the name to pass to the SQL engine for the new transaction.

Return Value:

Type: RdmTransaction

Exceptions:

Exception ConditionInvalidOperationException The connection is closed.InvalidOperationException A transaction is already in progress.

Page 57: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 57

BeginTransaction(string, IsolationLevel) Method

Syntax:

public RdmTransaction BeginTransaction(String transactionName, IsolationLevel iso-

lationLevel)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be committed or discarded all together. There can only be one transaction active per connection.

This method creates a transaction with the specified transaction name and the specified isolation level.

Parameters:

transactionName

Type: System.String

Specifies the name to pass to the SQL engine for the new transaction.

isolationLevel

Type: System.Data.IsolationLevel

Specifies the isolation level for the transaction.  The RDM Data Adapter directly supports the Iso-lationLevel.Serializable and Isolation.Snapshot isolation levels.  All other isolation levels will be silently mapped to IsolationLevel.Serializable.

Return Value:

Type: RdmTransaction

Exceptions:

Exception ConditionInvalidOperationException The connection is closed.InvalidOperationException A transaction is already in progress.

Page 58: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 58

ChangeDatabase(string) Method

Syntax:

public void ChangeDatabase(String databaseName)

Description:

Changes the currently active database.

Parameters:

databaseName

Type: System.String

Specifies the name of the database to access.  This must be a valid database name.

Return Value:

None

Exceptions:

Exception ConditionArgumentNullException The databaseName is null.RdmException The SQL engine could not change to the specified database.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnection.ChangeDatabase

Page 59: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 59

Close() Method

Syntax:

public void Close()

Description:

Closes the connection.

Parameters:

None

Return Value:

None

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection.Close

Page 60: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 60

CreateCommand() Method

Syntax:

public RdmCommand CreateCommand()

Description:

Creates a new RdmCommand object associated with the current connection.

Parameters:

None

Return Value:

RdmCommand

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnection.CreateCommand

Page 61: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 61

EnlistTransaction(Transaction) Method

Syntax:

public void EnlistTransaction(Transaction transaction)

Description:

Enlists the current connection in the specified transaction.

This method is not currently supported in the RDM Data Provider and will generate a NotSupportedException().

Parameters:

transaction

Type: System.Transactions.Transaction

Specifies the name of the database to access.  This must be a valid database name.

Return Value:

None

Exceptions:

Exception ConditionNotSupportedException When called.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnection.CreateCommand

Page 62: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 62

GetSchema() Method

Syntax:

public DataTable GetSchema()

Description:

Returns metadata schema information for this connection. This behaves identical to calling GetSchema("Meta-DataCollections"), which returns a list of collections that is supported by the RDM Data Provider.

See GetSchema(string, string[]) for details.

Parameters:

None

Return Value:

System.Data.DataTable

Exceptions:

Exception ConditionRdmException The SQL engine could not access the meta data. This may occur if a trans-

action is active for the connection.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection.GetSchema

Page 63: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 63

GetSchema(string) Method

Syntax:

public DataTable GetSchema(string collectionName)

Description:

Returns metadata schema information for this connection using the specified string for the schema (collection) name. The method operates identically to calling GetSchema(collectionName, null).

See GetSchema(string, string[]) for details on which collection names are available.

Parameters:

collectionName

Type: System.String

Specifies the name of the collection to return.

Return Value:

System.Data.DataTable

Exceptions:

Exception ConditionRdmException The SQL engine could not access the meta data. This may occur if a trans-

action is active for the connection.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection.GetSchema

Page 64: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 64

GetSchema(string, string[]) Method

Syntax:

public DataTable GetSchema(string collectionName, string[] restrictionValues)

Description:

Returns metadata schema information for this connection using the specified string for the schema (collection) name. The method operates identically to calling GetSchema(collectionName, null).

Here are the available collection names.

Collection Name DescriptionDataTypes Returns information about the types supported by the RDM Data Provider.Columns Returns column information in a table/database.ForeignKeys Returns foreign key information in a table/database.ForeignKeyColumns Returns column information for foreign keys in a table/database.Indexes Returns index information for a table/database.IndexColumns Returns column information for indexes in a table/database.MetaDataCollections Returns information about which collections are available.Tables Returns table information for a database.

Each of these collections returns a table with the following columns. Each table can support restriction values, which control which rows show up in the table. For instance, the Table collection has three restrictions – one for the database name, one for the table name, and one for the column name. Each is optional. You can query for all the columns in a table by specifying the database name as restriction one, the table name as restriction two and null as restriction three. If you want to query for one column, specify all three restriction values. To specify the sec-ond or subsequent restriction, each of the previous restrictions must be specified or be null.

The columns returned and restriction values for each of the collections is described below.

DataTypes: (one restriction value)

Column Name Type Description Restriction IndexTypeName String The RDM type. 0

ProviderDbType Int32 The ADO.Net data type (from the RdmTypes class).

ColumnSize Int64 The maximum length for the type.

CreateFormat String A string representing how to create this type in a CREATE TABLE statement, containing parameter markers (i.e. {0} or {1}) for each dif-ferent parameter type.

CreateParameters String A comma separated list of parameters

Page 65: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 65

Column Name Type Description Restriction Indexrequired to specify the type in a CREATE TABLE statement.

DataType String The .NET Framework data type that cor-responds to the RDM type.

IsAutoIncrementable Boolean Indicates if the type can be used for a col-umn that auto-increments. This does not mean that all columns of this type are auto-incrementable.

IsBestMatch Boolean Indicates that the particular RDM type is the best match for the associated .NET Frame-work type. Multiple RDM types can match to a single .NET Framework type and when they do, only one of them should have the IsBestMatch column set to true.

IsCaseSensitive Boolean True if the data type holds character data and it is case sensitive.

IsFixedLength Boolean True if the data type is fixed length once it has been created and false if the field has a variable length.

IsFixedPrecisionScale Boolean True if the data type has a fixed precision and scale or false if it does not.

IsLong Boolean True if the data type is considered a long type (i.e. LONG VARCHAR or CLOB)

IsNullable Boolean True if the data type can be assigned a null value

IsSearchable Boolean True if the data type can be used in a WHERE clause with any operator, except LIKE.

IsSearchableWithLike Boolean True if the data type can be used in a WHERE clause with the LIKE operator.

IsUnsigned Boolean True if the data type is unsigned.

MaximumScale Int16 If the type is numeric this holds the max-imum number of digits allowed to the right of the decimal point. Otherwise it is DbNull.Value.

MinimumScale Int16 If the type is numeric this holds the minimum number of digits allowed to the right of the decimal point. Otherwise it is DbNull.Value.

IsConcurrencyType Boolean True if the data type is updated by the data-base every time a row is modified, false if it is not, and DbNull.Value if the database does not support this kind of type.

IsLiteralsSupport Boolean True if the data type can be expressed as a literal.

LiteralPrefix String The prefix applied to specify a literal of this data type. DbNull.Value if no prefix is required.

LiteralSuffix String The suffix applied to specify a literal of this

Page 66: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 66

Column Name Type Description Restriction Indexdata type. DbNull.Value if no suffix is required.

Columns: (3 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the column is from. 0

TableName String The table the column is from 1

ColumnName String The column name 2

OrdinalPosition Int32 The position in the table for the specified column

DataType Int32 The ADO.NET data type of the column (from the Sys-tem.Data.DbType enumeration)

Nullable Boolean Indicates whether the column is nullable or not.

ForeignKeys: (3 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the foreign key is

from.0

ForeignKeyTableName String The table the foreign key is from 1

ForeignKeyName String The foreign key name 2

PrimaryKeyTableName String The name of the table that contains the associated primary key

PrimaryKeyName String The name of the associated primary key

UpdateRule Int16 0 – indicates that the change will be cas-caded1 – indicates that the value will be changed to null2 – indicates that the update will cause a failure

DeleteRule Int16 Indicates the behavior when a delete would break referential integrity.0 – indicates that the change will be cas-caded.1 – indicates that the value will be changed to null.2 – indicates that the delete will cause a failure

ForeignKeyColumns: (4 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the foreign key is from. 0

TableName String The table the foreign key is from 1

Page 67: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 67

Column Name Type Description Restriction IndexName String The foreign key name 2

ColumnName String The name of the column name in the foreign key 3

OrdinalPosition Int16 The position of the column within the foreign key

Indexes: (4 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the foreign key is from. 0

TableName String The table the foreign key is from 1

Name String The foreign key name 2

ColumnName String The name of the column name in the foreign key 3

OrdinalPosition Int16 The position of the column within the foreign key

IndexColumns: (4 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the foreign key is from. 0

TableName String The table the foreign key is from 1

Name String The foreign key name 2

ColumnName String The name of the column name in the foreign key 3

OrdinalPosition Int16 The position of the column within the foreign key

MetaDataCollections: (0 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the foreign key is from. 0

TableName String The table the foreign key is from 1

Name String The foreign key name 2

ColumnName String The name of the column name in the foreign key 3

OrdinalPosition Int16 The position of the column within the foreign key

Tables: (3 restriction values)

Column Name Type Description Restriction IndexDatabaseName String The schema (database) the table is from. 0

TableName String The table name 1

TableType String The table time (currently only ‘TABLE’ is supported) 2

Parameters:

collectionName

Type: System.String

Specifies the name of the collection to return.

Page 68: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 68

restrictionValues

Type: System.String []

Specifies a set of restriction values for the requested schema.

Return Value:

System.Data.DataTable

Exceptions:

Exception ConditionRdmException The SQL engine could not access the meta data. This may occur if a trans-

action is active for the connection.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection.GetSchema

Page 69: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnection Class 69

Open() Method

Syntax:

public void Open()

Description:

Opens the connection using the current ConnectionString value.

Exceptions:

Exception ConditionRdmException A transaction was already in progress when auto commit was disabled

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnection.Open

Page 70: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 70

RdmConnectionStringBuilder ClassDescription:

The RdmConnectionStringBuilder class, derived from DbConnectionStringBuilder, provides a simple way to create and manage the contents of connections strings used by the RdmConnection class.

Public Constructors:

 l RdmConnectionStringBuilder() l RdmConnectionStringBuilder(string connectionString)

Public Properties:

 l AutoCommit l BrowsableConnectionString l ConnectionString l Count l Database l DateFormat l DateSeparator l Host l IsFixedSize l IsReadOnly l Item l Keys l LockTimeout l OpenMode l Port l ReadOnlyTransactions l Values

Public Methods:

 l Add l Clear l ContainsKey l Equals(Object other)   (Inherited from Object) l EquivalentTo l GetHashCode()   (Inherited from Object)

Page 71: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 71

 l GetType()   (Inherited from Object) l Remove l ShouldSerialize l ToString()   (Inherited from Component) l TryGetValue(string, out Object)

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbConnectionStringBuilder

Page 72: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 72

RdmConnectionStringBuilder() Constructor

Syntax:

public RdmConnectionStringBuilder()

Description:

The default constructor for the RdmConnectionStringBuilder class. Specifying a new RdmConnection object with this constructor generates a new connection string object with an empty ConnectionString.

Parameters:

None

Exceptions:

None

Page 73: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 73

RdmConnectionStringBuilder(string) Constructor

Syntax:

public RdmConnectionStringBuilder(string connectionString)

Description:

A constructor for the RdmConnectionStringBuilder class. Specifying a new RdmConnectionStringBuilder object with this constructor generates a new connection string object with the specified connection string. If the con-nection string is not valid an exception will be thrown. See the ConnectionString property for valid connection string syntax.

Parameters:

connectionString

Type: System.String

Specifies the connection string to use for connecting to the database.

Exceptions:

Exception ConditionArgumentException One or more parts do not follow the <key>=<value> format.ArgumentException The key specified is not recognized.ArgumentException The value is not appropriate for the specified key.OverflowException The value was expected to be a number but was too large or small for an

Int32.FormatException The value was expected to be numeric but was not a valid number

Page 74: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 74

Add(string, Object) Method

Syntax:

public void Add(string keyword, Object value)

Description:

Adds an entry with the specified key and value into the RdmConnectionStringBuilder.

Parameters:

keyword

Type: System.String

The key to add to the RdmConnectionStringBuilder.

value

Type: System.Object

The value for the specified key

Return Value:

None

Exceptions:

Exception ConditionArgumentNullException The key specified is null.ArgumentException The key specified is not a valid key.ArgumentException The value is not appropriate for the specified key.OverflowException The value was expected to be a number but was too large or small for an

Int32.FormatException The value was expected to be numeric but was not a valid number

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Add

Page 75: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 75

Clear() Method

Syntax:

public void Clear()

Description:

Clears the contents of the RdmConnectionStringBuilder. All key/value pairs are removed and reset to their default values.

Parameters:

None

Return Value:

None

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Clear

Page 76: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 76

ContainsKey(string) Method

Syntax:

public bool ContainsKey(string keyword)

Description:

Determines whether the RdmConnectionStringBuilder contains a specific key.

Parameters:

keyword

Type: System.String

The key to locate in the RdmConnectionStringBuilder.

Return Value:

Type: System.Boolean

Returns true if the RdmConnectionStringBuilder contains an entry with the specified key; otherwise returns false.

Exceptions:

Exception ConditionArgumentNullException The key specified is null.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.ContainsKey

Page 77: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 77

EquivalentTo(DbConnectionStringBuilder) Method

Syntax:

public bool EquivalentTo(DbConnectionStringBuilder connectionStringBuilder)

Description:

Compares the connection information in this connection string builder with the connection information in the sup-plied connection string builder.

Parameters:

connectionStringBuilder

Type: System.Data.Common.DbConnectionStringBuilder

The connection string builder to compare to the current connection string builder.

Return Value:

Type: System.Boolean

Returns true if the connection information in both connection string builders causes equivalent connection strings; otherwise it returns false.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.EquivalentTo

Page 78: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 78

Remove(string) Method

Syntax:

public bool Remove(string keyword)

Description:

Removes the entry with the specified key from the RdmConnectionStringBuilder.

Parameters:

keyword

Type: System.String

The key to remove in the RdmConnectionStringBuilder.

Return Value:

Type: System.Boolean

Returns true if the key existed within the connection string; otherwise it returns false.

Exceptions:

Exception ConditionArgumentNullException The key specified is null.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Remove

Page 79: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 79

ShouldSerialize(string) Method

Syntax:

public bool ShouldSerialize(string keyword)

Description:

Determines whether the RdmConnectionStringBuilder contains a specific key.

Parameters:

keyword

Type: System.String

The key to locate in the RdmConnectionStringBuilder.

Return Value:

Type: System.Boolean

Returns true if the RdmConnectionStringBuilder contains an entry with the specified key; otherwise returns false. This method behaves identically to the ContainsKey method.

Exceptions:

Exception ConditionArgumentNullException The key specified is null.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.ShouldSerialize

Page 80: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 80

TryGetValue(string, out Object) Method

Syntax:

public bool TryGetValue(string keyword, out Object value)

Description:

Retrieves a value corresponding to the supplied key from this RdmConnectionStringBuilder

Parameters:

keyword

Type: System.String

The key to locate in the RdmConnectionStringBuilder.

value

Type: System.Object

The value for the specified key

Return Value:

Type: System.Boolean

Returns true if the keyword was found in the RdmConnectionStringBuilder; otherwise returns false.

Exceptions:

Exception ConditionArgumentNullException The key specified is null.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.TryGetValue

Page 81: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 81

AutoCommit Property

Syntax:

public bool AutoCommit { get; set; }

Description:

Type: System.Boolean

Gets or sets the auto commit mode of the connection. The auto commit mode determines whether a transaction has to be started explicitly or not. If auto commit is on then each executed statement will automatically start and end a transaction if an existing transaction is not already started. Explicit transactions can still be created but are not required. If auto commit is not on then transactions must be explicitly started and ended.

While auto commit is a nice convenience, most serious database applications will want to disable this mode so that changes that are related will all occur within a single transaction. This way they will either all be committed or none will.

The default connection has auto commit mode enabled.

Exceptions:

None

Page 82: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 82

BrowsableConnectionString Property

Syntax:

public bool BrowsableConnectionString { get; set; }

Description:

Type: System.Boolean

True if the connection string is visible within designers; false otherwise. The default is true. This setting is designed for use Visual Studio designers.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.BrowsableConnectionString

Page 83: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 83

ConnectionString Property

Syntax:

public string ConnectionString { get; set; }

Description:

Type: System.String

Gets or sets the current connection string. See the RdmConnection.ConnectionString page for more details.

Exceptions:

Exception ConditionArgumentException One or more parts do not follow the <key>=<value> format.ArgumentException The key specified is not recognized.ArgumentException The value is not appropriate for the specified key.OverflowException The value was expected to be a number but was too large or small for an

Int32.FormatException The value was expected to be numeric but was not a valid number

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.ConnectionString

Page 84: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 84

Count Property

Syntax:

public int Count{ get; }

Description:

Type: System.Int32

Gets the current number of keys that are contained within the ConnectionString property.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Count

Page 85: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 85

Database Property

Syntax:

public string Database { get; set; }

Description:

Type: System.String

Gets or sets the current database information in the connection string. The database information specifies which database(s) will be opened when the connection is opened. The default is none.

Exceptions:

None

Page 86: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 86

DateFormat Property

Syntax:

public RdmDateFormat DateFormat { get; set; }

Description:

Type: RdmDateFormat

Gets or sets the current date format information in the connection string. The date format (along with the date separator) controls how the SQL engine will convert dates to strings. This has no effect on dates retrieved as DateTime objects or as dates converted to strings by the ADO.NET Data Provider itself.

Valid values are YYYYMMDD, MMDDYYYY, and DDMMYYYY. The default if none is specified is YYYYMMDD.

Exceptions:

None

Page 87: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 87

DateSeparator Property

Syntax:

public char DateSeparator { get; set; }

Description:

Type: System.Char

Gets or sets the current date separator information in the connection string. The date separator (along with the date format) controls how the SQL engine will convert dates to strings, indicating what character is to be used between the year, month, and day sections of the date. This has no effect on dates retrieved as DateTime objects or as dates converted to strings by the ADO.NET Data Provider itself.

Valid values are '/' (forward slash) and '-' (dash). The default, if none is specified, is '-'.

Exceptions:

Exception ConditionArgumentException The supplied value is not a valid date separator.

Page 88: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 88

Host Property

Syntax:

public string Host{ get; set; }

Description:

Type: System.String

Gets or sets the current host information in the connection string. The host information specifies how the ADO.NET Data Provider should connect to the RDM database. There are two options. The first is via TCP/IP to an rdmsqlserver process running somewhere (on the same machine or on the network somewhere). If this options is specified, the Host property should be set to the hostname or IP address of the rdmsqlserver. If this option is specified, the Port property will be used as well.

The second option is to connect to the RDM database via the Platform Invoke Services (direct calls into the unmanaged code of the RDM database code). This is faster, but some applications may not wish to include calls to unmanaged code. If this option is specified, the Host property to should be set to 'local' and the Port property will be ignored.

Exceptions:

None

Page 89: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 89

IsFixedSize Property

Syntax:

public bool IsFixedSize{ get; }

Description:

Type: System.Boolean

Gets a value that indicates whether the connection string builder is a fixed size. Will always return false.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.IsFixedSize

Page 90: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 90

IsReadOnly Property

Syntax:

public bool IsReadOnly{ get; }

Description:

Type: System.Boolean

Gets a value that indicates whether the connection string builder is read only. Will always return false.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.IsReadOnly

Page 91: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 91

Item Property

Syntax:

public Object this[string keyword] { get; set; }

Description:

Type: System.Object

The value to associate with the specified key. If the specified key is valid, but not found, trying to get it returns a null reference and trying to set it creates a new element using the specified key.

Parameters:

keyword

Type: System.String

Specifies the key of the item to get or set.  See ConnectionString for a list of valid keywords.

Exceptions:

Exception ConditionArgumentNullException The key specified is null.ArgumentException The key specified is not a valid key.ArgumentException The value is not appropriate for the specified key.OverflowException The value was expected to be a number but was too large or small for an

Int32.FormatException The value was expected to be numeric but was not a valid number

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Item

Page 92: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 92

Keys Property

Syntax:

public ICollection Keys{ get; }

Description:

Type: System.Collections.ICollection

Gets a collection that contains all the keys currently in use in the connection string builder, in no specified order, however the order is guaranteed to be the same as in the collection returned by the Values property.

The collection returned is not static, meaning changes in the original RdmConnectionStringBuilder are reflected in the collection returned from this property.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Keys

Page 93: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 93

LockTimeout Property

Syntax:

public int LockTimeout { get; set; }

Description:

Type: System.Int32

Gets or sets the lock timeout information for the connection string. The lock timeout controls how the database engine handles locks that are not immediately grantable. By default it will wait a specified number of seconds and if the locks are still unavailable will then return an error. The LockTimeout controls the length of this timeout period. A value of zero will cause the lock request to return immediately. A value of -1 will cause the lock request to wait forever. The default lock timeout, if none is specified, is 10 seconds.

Exceptions:

Exception ConditionArgumentException The value specified is not valid (i.e. less than -1).

Page 94: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 94

OpenMode Property

Syntax:

public string OpenMode{ get; set; }

Description:

Type: System.String

Gets or sets the current open mode in the connection string. The open mode controls how databases are opened by the SQL engine. Available open modes are "s" (shared mode), "x" (exclusive mode), "r" (read only mode), and "xn" (exclusive with no transactions). The default if unspecified is shared mode.

Exceptions:

Exception ConditionArgumentException The value specified is not valid (i.e. not one of the listed modes).

Page 95: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 95

Port Property

Syntax:

public int Port { get; set; }

Description:

Type: System.Int32

Gets or sets the port information for the connection string. The port information, which is only useful when the host information is not "local", controls which port to use when communicating with the rdmsqlserver process.

Exceptions:

Exception ConditionArgumentException The value specified is not valid (i.e. less than -1).

Page 96: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 96

ReadOnlyTransactions Property

Syntax:

public bool ReadOnlyTransactions { get; set; }

Description:

Type: System.Boolean

Gets or sets the read only transactions information for the connection string. The read only transactions infor-mation indicates to the SQL engine how to do reading. The default mode (ReadOnlyTransactions is false) means that the SQL engine will acquire locks to read from the database. If ReadOnlyTransactions is set to true, the SQL engine will apply a read only transaction in order to do reading.

Exceptions:

None

Page 97: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmConnectionStringBuilder Class 97

Values Property

Syntax:

public ICollection Values { get; }

Description:

Type: System.Collections.ICollection

Gets a collection that contains all the values currently in use in the connection string builder, in no specified order, however the order is guaranteed to be the same as in the collection returned by the Keys property.

The collection returned is not static, meaning changes in the original RdmConnectionStringBuilder are reflected in the collection returned from this property.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbConnectionStringBuilder.Values

Page 98: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 98

RdmDataAdapter classDescription:

The RdmDataAdapter class, derived from DbDataAdapter, is a class that servers as a bridge between a DataT-able or DataSet and the data in an RDM database. Data is moved from the database to the DataTable or Data-Set when a Fill method is called and changes are made back to the database when an Update method is called.

Public Constructors:

 l RdmDataAdapter() l RdmDataAdapter(RdmCommand selectCommand) l RdmDataAdapter(string sql, RdmConnection conn) l RdmDataAdapter(string sql, string connectionString)

Public Properties:

 l AcceptChangesDuringFill { get; set; }   (Inherited from DataAdapter) l AcceptChangesDuringUpdate { get; set; }   (Inherited from DataAdapter) l Container { get; }   (Inherited from Component) l ContinueUpdateOnError { get; set; }   (Inherited from DataAdapter) l DeleteCommand { get; set; } l FillLoadOption { get; set; }   (Inherited from DataAdapter) l InsertCommand { get; set; } l MissingMappingAction { get; set; }   (Inherited from DataAdapter) l MissingSchemaAction { get; set; }   (Inherited from DataAdapter) l ReturnProviderSpecificTypes { get; set; }   (Inherited from DataAdapter) l SelectCommand { get; set; } l Site { get; set; }   (Inherited from Component) l TableMappings { get; set; }   (Inherited from DataAdapter) l UpdateBatchSize { get; set; } l UpdateCommand {get; set; }

Public Methods:

 l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l Dispose()   (Inherited from Component) l Equals(Object other)   (Inherited from Object) l Fill(DataSet dataSet) l Fill(DataTable dataTable)

Page 99: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 99

 l Fill(DataSet dataSet, string sourceTable) l Fill(int startRecord, int maxRecords, DataTable[] dataTables) l Fill(DataSet dataSet, int startRecord, int maxRecords, string sourceTable) l FillSchema(DataSet dataSet, SchemaType schemaType) l FillSchema(DataTable dataTable, SchemaType schemaType) l FillSchema(DataSet dataSet, SchemaType schemaType, string sourceTable) l GetFillParameters() l GetHashCode()   (Inherited from Object) l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetType()   (Inherited from Object) l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l ResetFillLoadOption()   (Inherited from DataAdapter) l ShouldSerializeAcceptChangesDuringFill()   (Inherited from DataAdapter) l ToString()   (Inherited from Component) l Update(DataRow[] dataRows) l Update(DataSet dataSet) l Update(DataTable dataTable) l Update(DataSet dataSet, string sourceTable)

Public Events:

 l Dispose()   (Inherited from Component) l FillError   (Inherited from DataAdapter) l RowUpdated l RowUpdating

Explicit Interface Implementations:

 l IDataAdapter.TableMappings l IDbDataAdapter.DeleteCommand l IDbDataAdapter.InsertCommand l IDbDataAdapter.SelectCommand l IDbDataAdapter.UpdateCommand

Page 100: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 100

RdmDataAdapter() Constructor

Syntax:

public RdmDataAdapter()

Description:

The default constructor for the RdmDataAdapter class. Specifying a new RdmDataAdapter object with this con-structor generates a new data adapter object with an empty SelectCommand, InsertCommand, Update-Command, and DeleteCommand.

Page 101: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 101

RdmDataAdapter(RdmCommand) Constructor

Syntax:

public RdmDataAdapter(RdmCommand command)

Description:

A constructor for the RdmDataAdapter class. Specifying a new RdmDataAdapter object with this constructor generates a new data adapter object with the specified RdmCommand as the SelectCommand and with an empty InsertCommand, UpdateCommand, and DeleteCommand.

Using this constructor is identical to the following commands:

RdmDataAdapter da = new RdmDataAdapter()

da.SelectCommand = command;

Parameters:

command

Type: RdmCommand

Specifies the command to use as the SelectCommand for this data adapter.

Page 102: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 102

RdmDataAdapter(string, RdmConnection) Constructor

Syntax:

public RdmDataAdapter(string sql, RdmConnection connection)

Description:

A constructor for the RdmDataAdapter class. Specifying a new RdmDataAdapter object with this constructor generates a new data adapter object with a new RdmCommand (created from connection) as the Select-Command and with an empty InsertCommand, UpdateCommand, and DeleteCommand.

Using this constructor is identical to the following commands:

RdmCommand cmd = new RdmCommand(sql, connection);

RdmDataAdapter da = new RdmDataAdapter()

da.SelectCommand = cmd;

Parameters:

sql

Type: System.String

Specifies the SQL select command to use as the CommandText of the newly created Select-Command.

connection

Type: RdmConnection

Specifies connection to use for the new RdmConnection that will be generated to produce the SelectCommand.

Page 103: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 103

RdmDataAdapter(string, string) Constructor

Syntax:

public RdmDataAdapter(string sql, string connectionString)

Description:

A constructor for the RdmDataAdapter class. Specifying a new RdmDataAdapter object with this constructor generates a new data adapter object with a new RdmCommand (created from a new RdmConnection using con-nectionString and with the CommandText set to sql) as the SelectCommand and with an empty Insert-Command, UpdateCommand, and DeleteCommand.

Using this constructor is identical to the following commands:

RdmConnection conn = new RdmConnection(connectionString);

RdmCommand cmd = new RdmCommand(sql, conn);

RdmDataAdapter da = new RdmDataAdapter()

da.SelectCommand = cmd;

Parameters:

sql

Type: System.String

Specifies the SQL select command to use as the CommandText of the newly created Select-Command.

connectionString

Type: System.String

Specifies the string to use as the ConnectionString for the new RdmConnection that will be gen-erated to produce the SelectCommand.

Page 104: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 104

RowUpdated Event

Syntax:

public event RdmRowUpdatedEventHandler RowUpdated

Description:

Type: RdmRowUpdatedEventHandler

The RowUpdated event occurs during an Update method after a command is executed against the database.

Page 105: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 105

RowUpdating Event

Syntax:

public event RdmRowUpdatingEventHandler RowUpdating

Description:

Type: RdmRowUpdatingEventHandler

The RowUpdating event occurs during an Update method before a command is executed against the database.

Page 106: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 106

IDbDataAdapter.DeleteCommand Property

Syntax:

IDbCommand IDbDataAdapter.DeleteCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmCommand used to delete records from the database.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbDataAdapter.DeleteCommand

Page 107: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 107

IDbDataAdapter.InsertCommand Property

Syntax:

IDbCommand IDbDataAdapter.InsertCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmCommand used to insert records into the database.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbDataAdapter.InsertCommand

Page 108: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 108

IDbDataAdapter.SelectCommand Property

Syntax:

IDbCommand IDbDataAdapter.SelectCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmCommand used to select records into the database.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbDataAdapter.SelectCommand

Page 109: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 109

IDataAdapter.TableMappings Property

Syntax:

ITableMappingCollection IDataAdapter.TableMappings { get; }

Description:

Type: System.Data.ITableMappingCollection

Indicates how the source table is mapped to a dataset table.

Reference:

For more information, reference MSDN documentation for: System.Data.IDataAdapter.TableMappings

Page 110: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 110

IDbDataAdapter.UpdateCommand Property

Syntax:

IDbCommand IDbDataAdapter.UpdateCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmCommand used to update records into the database.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbDataAdapter.UpdateCommand

Page 111: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 111

Fill(DataSet) Method

Syntax:

public int Fill(DataSet dataSet)

Description:

Adds or refreshes rows in the DataSet.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet to fill with records and, if necessary, schema.

Return Value:

Type: System.Int32

The number of rows successfully added to or refreshed in the DataSet.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Fill(Data-Set)

Page 112: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 112

Fill(DataTable) Method

Syntax:

public int Fill(DataTable dataTable)

Description:

Adds or refreshes rows in the DataTable.

Parameters:

dataTable

Type: System.Data.DataTable

The DataTable to fill with records and, if necessary, schema.

Return Value:

Type: System.Int32

The number of rows successfully added to or refreshed in the DataTable.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Fill(Data-Set)

Page 113: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 113

Fill(DataSet, string) Method

Syntax:

public int Fill(DataSet dataSet, string sourceTable)

Description:

Adds or refreshes rows in the DataSet for the DataTable named sourceTable.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet to fill with records and, if necessary, schema.

sourceTable

Type: System.String

The name of the DataTable to fill within the DataSet.

Return Value:

Type: System.Int32

The number of rows successfully added to or refreshed in the DataSet.

Exceptions:

Exception ConditionSystemException The specified source table is invalid.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Fill(Data-Set)

Page 114: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 114

Fill(int, int, DataTable[]) Method

Syntax:

public int Fill(int startRecord, int maxRecords, DataTable dataTables)

Description:

Adds or refreshes rows in the DataTables using the specified starting location and maximum number of records.

Parameters:

startRecord

Type: System.Int32

The zero-based record number to start with.

maxRecords

Type: System.Int32

The maximum number of records to retrieve.

dataTables

Type: System.Data.DataTable[]

The DataTables to fill with records and, if necessary, schema.

Return Value:

Type: System.Int32

The number of rows successfully added to or refreshed in the DataTables.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Fill(Data-Set)

Page 115: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 115

Fill(DataSet, int, int, string) Method

Syntax:

public int Fill(DataSet dataSet, int startRecord, int maxRecords, string source-

Table)

Description:

Adds or refreshes rows in the DataSet for the DataTable named sourceTable starting at record startRecord and continuing through maxRecords.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet to fill with records and, if necessary, schema.

startRecord

Type: System.Int32

The zero-based record number to start with.

maxRecords

Type: System.Int32

The maximum number of records to retrieve.

sourceTable

Type: System.String

The name of the DataTable to fill within the DataSet.

Return Value:

Type: System.Int32

The number of rows successfully added to or refreshed in the DataSet.

Exceptions:

Exception ConditionSystemException The specified source table is invalid.

Page 117: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 117

FillSchema(DataSet, SchemaType) Method

Syntax:

public DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType)

Description:

Adds a DataTable named "Table" to the specified DataSet and configures the schema to match that in the data-base based on the specified SchemaType.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet to fill with records and, if necessary, schema.

schemaType

Type: System.Data.SchemaType

One of the SchemaType values to specify how to insert the schema information.

Return Value:

Type: System.Data.DataTable[]

A reference to the collection of DataTable objects that were added to the DataSet.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.FillSchema(DataSet, SchemaType)

Page 118: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 118

FillSchema(DataTable, SchemaType) Method

Syntax:

public DataTable FillSchema(DataTable dataTable, SchemaType schemaType)

Description:

Configures the schema of the specified DataTable from the database based on the specified SchemaType.

Parameters:

dataTable

Type: System.Data.DataTable

The DataTable to fill with schema information from the database.

schemaType

Type: System.Data.SchemaType

One of the SchemaType values to specify how to insert the schema information.

Return Value:

Type: System.Data.DataTable

The supplied DataTable that was filled with schema information.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.FillSchema(DataSet, SchemaType)

Page 119: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 119

FillSchema(DataSet, SchemaType, String) Method

Syntax:

public DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType, string

sourceTable)

Description:

Adds a DataTable named sourceTable to the specified DataSet and configures the schema to match that in the database based on the specified SchemaType.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet to fill with records and, if necessary, schema.

schemaType

Type: System.Data.SchemaType

One of the SchemaType values to specify how to insert the schema information.

sourceTable

Type: System.String

The name of the DataTable to fill within the DataSet.

Return Value:

Type: System.Data.DataTable[]

A reference to the collection of DataTable objects that were added to the DataSet.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.FillSchema(DataSet, SchemaType)

Page 120: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 120

GetFillParameters() Method

Syntax:

public IDataParameter[] GetFillParameters()

Description:

Gets the parameters set by the user when executing the SelectCommand.

Return Value:

Type: System.Data.IDataParameter[]

An array of IDataParameter objects that contains the parameters set by the user.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataAdapter.GetFillParameters()

Page 121: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 121

Update(DataRow[]) Method

Syntax:

public int Update(DataRow[] dataRows)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deleted row in the specified array of DataRow objects.

Parameters:

dataRows

Type: System.Data.DataRow[]

An array of DataRow objects used to update the database.

Return Value:

Type: System.Int32

The number of rows successfully updated from the DataSet.

Exceptions:

Exception ConditionArgumentNullException The DataSet is invalidInvalidOperationException The source table is invalidSystemException The specified source table is invalid.SystemException No DataSet exists to use as a source.SystemException No DataTable exists to update.SystemException No DataRow exists to update.DBConcurrencyException An attempt to update the database resulted in zero records affected.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Update(DataRow[])

Page 122: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 122

Update(DataSet) Method

Syntax:

public int Update(DataSet dataSet)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deleted row in the specified DataSet.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet used to update the database.

Return Value:

Type: System.Int32

The number of rows successfully updated from the DataSet.

Exceptions:

Exception ConditionInvalidOperationException The source table is invalidDBConcurrencyException An attempt to update the database resulted in zero records affected.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Update(DataRow[])

Page 123: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 123

Update(DataTable) Method

Syntax:

public int Update(DataTable dataTable)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deleted row in the specified DataTable.

Parameters:

dataSet

Type: System.Data.DataTable

The DataTable used to update the database.

Return Value:

Type: System.Int32

The number of rows successfully updated from the DataTable.

Exceptions:

Exception ConditionArgumentNullException The DataSet is invalidInvalidOperationException The source table is invalidSystemException No DataSet exists to use as a source.SystemException No DataTable exists to update.SystemException No DataRow exists to update.DBConcurrencyException An attempt to update the database resulted in zero records affected.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Update(DataRow[])

Page 124: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 124

Update(DataSet, String) Method

Syntax:

public int Update(DataSet dataSet, string sourceTable)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deleted row in the specified DataSet for the specified table name.

Parameters:

dataSet

Type: System.Data.DataSet

The DataSet used to update the database.

sourceTable

Type: System.String

The name of the DataTable to update within the DataSet.

Return Value:

Type: System.Int32

The number of rows successfully updated from the DataSet.

Exceptions:

Exception ConditionArgumentNullException The DataSet is invalidInvalidOperationException The source table is invalidDBConcurrencyException An attempt to update the database resulted in zero records affected.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataAdapter.Update(DataRow[])

Page 125: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 125

DeleteCommand Property

Syntax:

public RdmCommand DeleteCommand { get; set; }

Description:

Type: RdmCommand

Gets or sets a command used to delete records from the data set.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataAdapter.DeleteCommand

Page 126: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 126

InsertCommand Property

Syntax:

public RdmCommand InsertCommand { get; set; }

Description:

Type: RdmCommand

Gets or sets a command used to insert records into the data set.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataAdapter.InsertCommand

Page 127: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 127

SelectCommand Property

Syntax:

public RdmCommand SelectCommand { get; set; }

Description:

Type: RdmCommand

Gets or sets a command used to select records from the database into the data set.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataAdapter.SelectCommand

Page 128: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 128

UpdateBatchSize Property

Syntax:

public int UpdateBatchSize { get; set; }

Description:

Type: System.Int32

Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. Possible values are:

Value Effect0 There is no limit on the batch size.1 Disables batch updating.>1 Changes are sent using batches of this size.

The ADO.NET Data Provider for RDM does not support batch processing, so setting this value to anything other than 1 will result in an exception.

Exceptions:

Exception ConditionArgumentException The value is not a valid RdmParameter.ArgumentException The specified parameter is already contained in another collection.IndexOutOfRangeException A parameter of the specified name does not exist

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataAdapter.UpdateCommand

Page 129: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataAdapter class 129

UpdateCommand Property

Syntax:

public RdmCommand UpdateCommand { get; set; }

Description:

Type: RdmCommand

Gets or sets a command used to update records in the database.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataAdapter.UpdateCommand

Page 130: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 130

RdmDataReader ClassDescription:

The RdmDataReader class, derived from DbDataReader, encapsulates all of the information to read the result set of a SQL query.

Public Properties:

 l Command l Depth l FieldCount l HasRows l IsClosed l Item[int] l Item[string] l RecordsAffected l VisibleFieldCount

Public Methods:

 l Close l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l Dispose()   (Inherited from Component) l Equals(Object other)   (Inherited from Object) l GetBoolean(int ordinal) l GetByte(int ordinal) l GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length) l GetChar(int ordinal) l GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length) l GetData(int ordinal) l GetDataTypeName(int ordinal) l GetDateTime(int ordinal) l GetDecimal(int ordinal) l GetDouble(int ordinal) l GetEnumerator() l GetFieldType(int ordinal) l GetFloat(int ordinal) l GetGuid(int ordinal) l GetHashCode()   (Inherited from Object)

Page 131: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 131

 l GetInt16(int ordinal) l GetInt32(int ordinal) l GetInt64(int ordinal) l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetName(int ordinal) l GetOrdinal(string name) l GetProviderSpecificFieldType(int ordinal) l GetProviderSpecificValue(int ordinal) l GetProviderSpecificValues(object[]) l GetSchemaTable() l GetString(int ordinal) l GetType()   (Inherited from Object) l GetValue(int ordinal) l GetValues(Object[]) l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l IsDbNull(int ordinal) l NextResult() l Read() l ToString()   (Inherited from Component)

Explicit Interface Implementations:

 l IDataRecord.GetData(int ordinal)

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader

Page 132: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 132

IDataRecord.GetData(int ordinal) Method

Syntax:

IDataReader IDataRecord.GetData(int ordinal)

Description:

Gets the value of the specified column as an IDataReader, when the column contains structured data.

This method is an explicit interface member implementation and can only be used when the RdmDataReader instance is cast to an IDataReader interface.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Data.IDataReader

The value of the specified column.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.IDataRecord.GetData

Page 133: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 133

Close() Method

Syntax:

public void Close()

Description:

Closes the data reader.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.Close

Page 134: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 134

GetBoolean(int) Method

Syntax:

public bool GetBoolean(int ordinal)

Description:

Get the value of the specified column as a Boolean.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Boolean

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetBoolean

Page 135: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 135

GetByte(int) Method

Syntax:

public byte GetByte(int ordinal)

Description:

Get the value of the specified column as a byte.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Boolean

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetByte

Page 136: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 136

GetBytes(int, long, byte[], int, int) Method

Syntax:

public long GetBytes(int ordinal, long dataOffset, byte[] buffer, int buff-

erOffset, int length)

Description:

Reads up to length bytes from the column ordinal, starting at the location indicated by dataOffset, into buffer start-ing at bufferOffset. If less bytes are available in the column, only that number of bytes will be read and the return value will indicate how many were actually read.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal.

dataOffset

Type: System.Int64

The index within the column from which to being the read operation.

buffer

Type: System.Byte[]

The buffer into which to copy the data.

bufferOffset

Type: System.Int32

The index within buffer where the data will be copied.

length

Type: System.Int32

The maximum number of bytes to read.

Return Value:

Type: System.Int32

The actual number of bytes read.

Page 137: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 137

Exceptions:

Exception ConditionArgumentNullException The specified buffer is null.ArgumentException The dataOffset is less than zeroInvalidOperationException The RdmDataReader is closed or there is no current row.ArgumentOutOfRangeException The bufferOffset is less than zero or bufferOffset plus length is greater than

the length of buffer.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetBytes

Page 138: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 138

GetChar(int) Method

Syntax:

public char GetChar(int ordinal)

Description:

Get the value of the specified column as a character.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Char

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetChar

Page 139: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 139

GetChars(int, long, char[], int, int) Method

Syntax:

public long GetChars(int ordinal, long dataOffset, char[] buffer, int buff-

erOffset, int length)

Description:

Reads up to length characters from the column ordinal, starting at the location indicated by dataOffset, into buffer starting at bufferOffset. If less characters are available in the column, only that number of characters will be read and the return value will indicate how many were actually read.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal.

dataOffset

Type: System.Int64

The index within the column from which to being the read operation.

buffer

Type: System.Byte[]

The buffer into which to copy the data.

bufferOffset

Type: System.Int32

The index within buffer where the data will be copied.

length

Type: System.Int32

The maximum number of characters to read.

Return Value:

Type: System.Int32

The actual number of characters read.

Page 140: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 140

Exceptions:

Exception ConditionArgumentNullException The specified buffer is null.ArgumentException The dataOffset is less than zeroInvalidOperationException The RdmDataReader is closed or there is no current row.ArgumentOutOfRangeException The bufferOffset is less than zero or bufferOffset plus length is greater than

the length of buffer.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetChars

Page 141: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 141

GetData(int) Method

Syntax:

public DbDataReader GetData(int ordinal)

Description:

Returns a DbDataReader object for the requested column.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Data.Common.DbDataReader

The value of the specified column in a DbDataReader

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetData

Page 142: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 142

GetDataTypeName(int) Method

Syntax:

public string GetDataTypeName(int ordinal)

Description:

Gets the name of the data type of the specified column

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.String

The string representing the name of the data type.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetDataTypeName

Page 143: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 143

GetDateTime(int) Method

Syntax:

public DateTime GetDateTime(int ordinal)

Description:

Get the value of the specified column as a DateTime object.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.DateTime

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetDateTime

Page 144: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 144

GetDecimal(int) Method

Syntax:

public decimal GetDecimal(int ordinal)

Description:

Get the value of the specified column as a Decimal object.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Decimal

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetDecimal

Page 145: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 145

GetDouble(int) Method

Syntax:

public double GetDouble(int ordinal)

Description:

Get the value of the specified column as a double-precision floating point number.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Double

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetDouble

Page 146: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 146

GetEnumerator() Method

Syntax:

public IEnumerator GetEnumerator()

Description:

Returns an IEnumerator that can be used to iterate through the rows in the data reader.

Parameters:

None

Return Value:

Type: System.Collections.IEnumerator

An IEnumerator that can be used to iterate through the rows in the data reader.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetEnumerator

Page 147: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 147

GetFieldType(int) Method

Syntax:

public Type GetFieldType(int ordinal)

Description:

Gets the data type of the specified column.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Type

The data type of the specified column

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetFieldType

Page 148: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 148

GetFloat(int) Method

Syntax:

public float GetFloat(int ordinal)

Description:

Get the value of the specified column as a single-precision floating point number.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Single

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetFloat

Page 149: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 149

GetGuid(int) Method

Syntax:

public Guid GetGuid(int ordinal)

Description:

Get the value of the specified column as a globally-unique identifier (GUID).

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Guid

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetGuid

Page 150: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 150

GetInt16(int) Method

Syntax:

public short GetInt16(int ordinal)

Description:

Get the value of the specified column as a 16-bit signed integer.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Int16

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetInt16

Page 151: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 151

GetInt32(int) Method

Syntax:

public int GetInt32(int ordinal)

Description:

Get the value of the specified column as a 32-bit signed integer.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Int32

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetInt32

Page 152: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 152

GetInt64(int) Method

Syntax:

public long GetInt64(int ordinal)

Description:

Get the value of the specified column as a 64-bit signed integer.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Int64

The value of the specified column

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetInt64

Page 153: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 153

GetName(int) Method

Syntax:

public string GetName(int ordinal)

Description:

Gets the name of the column

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.String

The name of the specified column.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetName

Page 154: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 154

GetOrdinal(string) Method

Syntax:

public int GetOrdinal(string name)

Description:

Gets the column ordinal given the name of the column

Parameters:

name

Type: System.String

The name of the column

Return Value:

Type: System.Int32

The zero-base column ordinal

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed.IndexOutOfRangeException The specified name was not a valid column name

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetOrdinal

Page 155: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 155

GetProviderSpecificFieldType(int) Method

Syntax:

public Type GetProviderSpecificFieldType(int ordinal)

Description:

Returns a provider-specific field type of the specified column

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Type

The data type of the specified column

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetProviderSpecificFieldType

Page 156: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 156

GetProviderSpecificValue(int) Method

Syntax:

public Object GetProviderSpecificValue(int ordinal)

Description:

Gets the value of the specified column as an instance of Object.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Object

The data type of the specified column

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetProviderSpecificValue

Page 157: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 157

GetProviderSpecificValues(Object[]) Method

Syntax:

public int GetProviderSpecificValues(Object[] values)

Description:

Populates an array of objects with the column values of the current row.

Parameters:

values

Type: System.Object[]

An array of Object into which to copy the column values.

Return Value:

Type: System.Int32

The data type of the specified column

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.GetProviderSpecificValues

Page 158: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 158

GetSchemaTable() Method

Syntax:

public DataTable GetSchemaTable()

Description:

Returns a DataTable that describes the column metadata of the data reader.

The resulting table has a row for each column in the result set. The following columns are present.

ColumnName The name of the column in the result set.ColumnOrdinal The ordinal position of the column in the result set.ColumnSize The size of the column in the result set.NumericPrecisionThe precision for numeric types of the column in the result set.NumericScale The scale for numeric types of the column in the result set.DataType The data type of the column in the result set.ProviderType The provider specific data type of the column in the result set.IsLong True if the column in the result set is a BLOB, CLOB or WCLOBAllowDBNull True if the column in the result set allows NULL values.IsReadOnly True if the column in the result set is read-only.IsRowVersion True if the column in the result set contains row version information.IsUnique True if the column in the result set is involved in a uniqueness constraint.IsKey True if the column in the result set is involved in a key.IsAutoIncrement True if the column in the result set is an auto-increment column.BaseSchemaName The name of the database the column in the result set comes from.BaseTableName The name of the table the column in the result set comes from.BaseColumnName The base name of the column in the result set.

Return Value:

Type: System.Data.DataTable

A DataTable that describes the column metadata.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed.

Page 160: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 160

GetString(int) Method

Syntax:

public string GetString(int ordinal)

Description:

Get the value of the specified column as a String.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.String

The value of the specified column.

Exceptions:

Exception ConditionInvalidCastException The specified cast is not valid. This usually means the column data cannot be

converted to the requested type.InvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetString

Page 161: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 161

GetValue(int) Method

Syntax:

public Object GetValue(int ordinal)

Description:

Gets the value of the specified column as an Object.

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Object

The value of the specified column.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetValue

Page 162: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 162

GetValues(Object[]) Method

Syntax:

public int GetValues(Object[] values)

Description:

Populates an array of objects with the column values of the current row

Parameters:

values

Type: System.Object

An array of Object into which to copy the column values

Return Value:

Type: System.Int32

The number of instances of Object in the array.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetValues

Page 163: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 163

IsDBNull(int) Method

Syntax:

public bool IsDBNull(int ordinal)

Description:

Gets a value that indicates whether the column is null

Parameters:

ordinal

Type: System.Int32

The zero-base column ordinal

Return Value:

Type: System.Boolean

True if the specified column is null; otherwise False.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.IsDBNull

Page 164: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 164

NextResult() Method

Syntax:

public bool NextResult()

Description:

Advances the reader to the next result set when there are multiple result sets available.

Parameters:

None

Return Value:

Type: System.Boolean

True if there is at least one more result set; otherwise False.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.NextResult

Page 165: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 165

Read() Method

Syntax:

public bool Read()

Description:

Advances the reader to the next record (row) in the current result set. The default position of a data reader (when first created or right after moving to the next result set) is before the first record, so you must call Read before beginning to access data.

Parameters:

None

Return Value:

Type: System.Boolean

True if there are more rows; otherwise False.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.Read

Page 166: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 166

Command Property

Syntax:

public RdmCommand Command { get; }

Description:

Type: RdmCommand

Gets the RdmCommand associated with the data reader.

Page 167: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 167

Depth Property

Syntax:

public int Depth { get; }

Description:

Type: System.Int32

Gets the depth of nesting for the current row. The RDM Data Provider does not support nesting and always returns zero.

Reference:

System.Data.Common.DbDataReader.Depth

Page 168: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 168

FieldCount Property

Syntax:

public int FieldCount { get; }

Description:

Type: System.Int32

Gets the number of columns in the current row.

Reference:

System.Data.Common.DbDataReader.FieldCount

Page 169: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 169

HasRows Property

Syntax:

public bool HasRows { get; }

Description:

Type: System.Boolean

Indicates whether there are rows in the data reader.

Exceptions:

Exception ConditionInvalidOperationException The data reader is invalid.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.HasRows

Page 170: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 170

IsClosed Property

Syntax:

public bool IsClosed { get; }

Description:

Type: System.String

Indicates whether the data reader is closed.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.IsClosed

Page 171: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 171

Item[int] Property

Syntax:

public Object this[int ordinal] { get; }

Description:

Type: System.Object

Gets the value of the specified column in the current row as an instance of Object

Parameters:

ordinal

Type: System.Int32

Specifies the zero-based column to return.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.IndexOutOfRangeException The ordinal provided is outside the range of 0 through FieldCount - 1

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.Item[Int32]

Page 172: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 172

Item[string] Property

Syntax:

public Object this[string name] { get; }

Description:

Type: System.Object

Gets the value of the specified column in the current row as an instance of Object

Parameters:

ordinal

Type: System.String

Specifies the name of the column to return.

Exceptions:

Exception ConditionInvalidOperationException The RdmDataReader is closed or there is no current row.IndexOutOfRangeException The specified name was not a valid column name

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.Item[String]

Page 173: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 173

RecordsAffected Property

Syntax:

public int RecordsAffected { get; }

Description:

Type: System.Int32

Gets the number of rows changed, inserted, or deleted. Returns -1 for SELECTED statements. Returns 0 if no rows were affected or the statement failed.

This value is not assigned until all the rows are read and the data reader is closed.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.RecordsAffected

Page 174: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDataReader Class 174

VisibleFieldCount Property

Syntax:

public int VisibleFieldCount { get; }

Description:

Type: System.Int32

Gets the number of fields that are not hidden. The RDM Data Provider does not implement hidden fields, so this value is always the same as FieldCount.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbDataReader.VisibleFieldCount

Page 175: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 175

RdmParameter ClassDescription:

The RdmParameter class, derived from DbParameter, represents a parameter that will be used with a com-mand.

Public Constructors:

 l RdmParameter() l RdmParameter(string, RdmType) l RdmParameter(string, Object)

Public Properties:

 l DbType l Direction l IsNullable l ParameterName l RdmType l Size l SourceColumn l SourceColumnNullMapping l SourceVersion l Value

Public Methods:

 l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l Equals(Object other)   (Inherited from Object) l GetHashCode()   (Inherited from Object) l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetType()   (Inherited from Object) l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l ResetDbType() l ResetRdmType() l ToString()   (Inherited from Component)

Page 176: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 176

Explicit Interface Implementations:

 l IDbDataParameter.Precision l IDbDataParameter.Scale

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameter

Page 177: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 177

RdmParameter() Constructor

Syntax:

public RdmParameter()

Description:

The default constructor for the RdmParameter class. Specifying a new RdmParameter object with this con-structor generates a new parameter object with an empty ParameterName and with new RdmParameter not being associated with any command. An association with an RdmCommand needs to be made before the new parameter object is useful.

Parameters:

None

Exceptions:

None

Page 178: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 178

RdmParameter(string, Object) Constructor

Syntax:

public RdmParameter(string parameterName, Object value)

Description:

A constructor for the RdmParameter class where the parameter name and value are specified. An association with an RdmCommand needs to be made before the new parameter object is useful.

Parameters:

parameterName

Type: System.String

The new parameter's name.

value

Type: System.Object

The value of the new parameter.  The type of the parameter will be inferred from the type of the Object.

Exceptions:

Exception ConditionArgumentNullException The specified value is null.ArgumentException The value is DBNull.Value but the parameter is not nullableArgumentException The type of value is not an anticipated type

Page 179: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 179

RdmParameter(string, RdmType) Constructor

Syntax:

public RdmParameter(string parameterName, RdmType dataType)

Description:

A constructor for the RdmParameter class where the parameter name and default type for the parameter are specified. An association with an RdmCommand needs to be made before the new parameter object is useful.

Parameters:

parameterName

Type: System.String

The new parameter's name.

dataType

Type: RdmType

The data type of the new parameter.

Exceptions:

None

Page 180: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 180

IDbDataParameter.Precision Property

Syntax:

byte IDbDataParameter.Precision { get; set; }

Description:

Type: System.Byte

Gets or sets a value that indicates the precision of the parameter for numeric types.

This method is an explicit interface member implementation and can only be used when the RdmParameter instance is cast to an IDbDataParameter interface.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbDataParameter.Precision

Page 181: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 181

IDbDataParameter.Scale Property

Syntax:

byte IDbDataParameter.Scale { get; set; }

Description:

Type: System.Byte

Gets or sets a value that indicates the scale of the parameter for numeric types.

This method is an explicit interface member implementation and can only be used when the RdmParameter instance is cast to an IDbDataParameter interface.

Reference:

For more information, reference MSDN documentation for: System.Data.IDbDataParameter.Scale

Page 182: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 182

ResetDbType() Method

Syntax:

public void ResetDbType()

Description:

Resets the DbType and RdmType properties to their original settings. If a Value has been specified, the new DbType and RdmType properties will be inferred from the type of Value.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameter.ResetDbType

Page 183: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 183

ResetRdmType() Method

Syntax:

public void ResetRdmType()

Description:

Resets the DbType and RdmType properties to their original settings. If a Value has been specified, the new DbType and RdmType properties will be inferred from the type of Value.

Page 184: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 184

DbType Property

Syntax:

public DbType DbType { get; set; }

Description:

Type: System.Data.DbType

Gets or sets the DbType of the parameter. The DbType and RdmType parameters are linked. Setting either changes the other to a matching value.

Exceptions:

Exception ConditionNotSupportedException The type specified is not a supported type.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameter.DbType

Page 185: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 185

Direction Property

Syntax:

public ParameterDirection Direction { get; set; }

Description:

Type: System.Data.ParameterDirection

Gets or sets a value that indicates whether the parameter is input, output, input/output or a stored procedure return value. Only input parameters are supported by the RDM Data Provider.

Exceptions:

Exception ConditionNotSupportedException The parameter direction supplied is not supported.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameter.Direction

Page 186: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 186

IsNullable Property

Syntax:

public bool IsNullable { get; set; }

Description:

Type: System.Boolean

Gets or sets a value that indicates whether the parameter accepts null values.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameter.IsNullable

Page 187: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 187

ParameterName Property

Syntax:

public string ParameterName { get; set; }

Description:

Type: System.String

The name of the parameter. The default is an empty string ("").

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameter.ParameterName

Page 188: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 188

RdmType Property

Syntax:

public RdmType RdmType { get; set; }

Description:

Type: RdmType

Gets or sets the RdmType of the parameter. The RdmType and DbType properties are linked. Setting either changes the other to a matching value.

Page 189: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 189

Size Property

Syntax:

public int Size { get; set; }

Description:

Type: System.Int32

The Size property is used for binary and string types. For binary data, the size is the number of bytes. For string data the size is the number of characters and does not include the null terminating character.

Exceptions:

Exception ConditionArgumentOutOfRangeException The value specified is less than zero.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParamter.Size

Page 190: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 190

SourceColumn Property

Syntax:

public string SourceColumn { get; set; }

Description:

Type: System.String

Gets or sets the name of the source column mapped to this parameter. This intended for use in data adapters.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameter.SourceColumn

Page 191: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 191

SourceColumnNullMapping Property

Syntax:

public bool SourceColumnNullMapping { get; set; }

Description:

Type: System.Boolean

Gets or sets a value which indicates whether the source column is nullable. This intended for use by command builders.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameter.SourceColumnNullMapping

Page 192: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 192

SourceVersion Property

Syntax:

public DataRowVersion SourceVersion { get; set; }

Description:

Type: System.Data.DataRowVersion

Gets or sets the DataRowVersion to use when loading the Value. This parameter is intended for use by an RdmDataAdapater.UpdateCommand during an update operation.

Exceptions:

Exception ConditionArgumentException The property is not set to one of the DataRowVersion values

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameter.SourceVersion

Page 193: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameter Class 193

Value Property

Syntax:

public Object Value { get; set; }

Description:

Type: System.Object

Gets or sets the value of the parameter. If the DbType or RdmType has not already be specified, setting the Value will cause the type to be inferred. If the type has been established, setting the Value will cause the Value to be converted to the specified type (if necessary).

Exceptions:

Exception ConditionArgumentNullException The specified value is null.ArgumentException The value is DBNull.Value but the parameter is not nullableArgumentException The type of value is not an anticipated type

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameter.Value

Page 194: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 194

RdmParameterCollection ClassDescription:

The RdmParameterCollection class, derived from DbParameterCollection, represents a collection of param-eters.

Public Properties:

 l Count l IsFixedSize l IsReadOnly l IsSynchronized l Item[int] l Item[string] l SyncRoot

Public Methods:

 l Add(Object) l Add(RdmParameter) l Add(string, RdmType) l Add(string, Object) l AddRange(Array) l AddRange(RdmParameter[]) l Clear() l Contains(Object) l Contains(RdmParameter) l Contains(string) l CopyTo(Array, int) l CopyTo(RdmParameter[], int) l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l Equals(Object other)   (Inherited from Object) l GetEnumerator() l GetHashCode()   (Inherited from Object) l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetType()   (Inherited from Object) l IndexOf(Object) l IndexOf(RdmParameter) l IndexOf(string)

Page 195: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 195

 l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l Insert(int, Object) l Insert(int, RdmParameter) l Remove(Object) l Remove(RdmParameter) l RemoveAt(int) l RemoveAt(string) l ToString()   (Inherited from Component)

Explicit Interface Implementations:

 l IDbDataParameterCollection.Item l IList.Item

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameterCollection

Page 196: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 196

IDataParameterCollection.Item[string] Property

Syntax:

Object IDataParameterCollection.this[string parameterName] { get; set; }

Description:

Type: System.Object

Gets or sets the RdmParameter with the specified name

Parameters:

parameterName

Type: System.String

The name of the parameter.

This method is an explicit interface member implementation and can only be used when the RdmPar-ameterCollection instance is cast to an IDataParameterCollection interface.

Exceptions:

Exception ConditionArgumentException The value is not a valid RdmParameter.ArgumentException The specified parameter is already contained in another collection.IndexOutOfRangeException A parameter of the specified name does not exist

Reference:

For more information, reference MSDN documentation for: System.Data.IDataParameterCollection.Item(String)

Page 197: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 197

IList.Item[int] Property

Syntax:

Object IList.this[int index] { get; set; }

Description:

Type: System.Object

Gets or sets the RdmParameter at the specified index

Parameters:

index

Type: System.Int32

The zero-based index of the parameter.

This method is an explicit interface member implementation and can only be used when the RdmPar-ameterCollection instance is cast to an IList interface.

Exceptions:

Exception ConditionArgumentException The value is not a valid RdmParameter.IndexOutOfRangeException A parameter of the specified name does not existIndexOutOfRangeException The specified index does not exist

Reference:

For more information, reference MSDN documentation for: System.Collections.IList.Item(Int32)

Page 198: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 198

Add(Object) Method

Syntax:

public int Add(Object value)

Description:

Adds a new RdmParameter object to the collection that with a Value of value.

Parameters:

value

Type: System.Object

The Value of the RdmParameter to add to the collection.

Return Value:

Type: System.Int32

The zero-based index of the new RdmParameter object in the collection.

Exceptions:

Exception ConditionArgumentException The specified value already exists in the collection.ArgumentException The value is not a valid RdmParameter.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Add

Page 199: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 199

Add(RdmParameter) Method

Syntax:

public int Add(RdmParameter value)

Description:

Adds a new RdmParameter object to the collection.

Parameters:

value

Type: RdmParameter

The new parameter to add to the collection.

Return Value:

Type: System.Int32

The zero-based index of the new RdmParameter object in the collection.

Page 200: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 200

AddRange(Array) Method

Syntax:

public void AddRange(Array values)

Description:

Adds an array of new RdmParameter objects to the collection with the specified values.

Parameters:

values

Type: System.Array

The array of values for the new parameters.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbParameterCollection.AddRange

Page 201: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 201

AddRange(RdmParameter[]) Method

Syntax:

public void AddRange(RdmParameter[] parameters)

Description:

Adds an array of new RdmParameter objects to the collection.

Parameters:

parameters

Type: RdmParameter[]

The array of new parameters to add to the collection

Page 202: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 202

Add(string, Object) Method

Syntax:

public int Add(string parameterName, Object value)

Description:

Adds a new RdmParameter object (specified by value) to the collection with the specified ParameterName.

Parameters:

parameterName

Type: System.String

The name of the new parameter to add to the collection.

value

Type: System.Object

The new parameter to add to the collection.

Return Value:

Type: System.Int32

The zero-based index of the new RdmParameter object in the collection.

Exceptions:

Exception ConditionArgumentException The specified value already exists in the collection.ArgumentException The value is not a valid RdmParameter.

Page 203: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 203

Add(string, RdmType) Method

Syntax:

public int Add(string parameterName, RdmType dataType)

Description:

Adds a new RdmParameter object to the collection with the specified ParameterName and RdmType.

Parameters:

parameterName

Type: System.String

The name of the new parameter to add to the collection.

dataType

Type: RdmType

The type of the new parameter to add to the collection.

Return Value:

Type: System.Int32

The zero-based index of the new RdmParameter object in the collection.

Page 204: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 204

Clear() Method

Syntax:

public void Clear()

Description:

Removes all RdmParameter values from the collection

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Clear

Page 205: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 205

Contains(Object) Method

Syntax:

public bool Contains(Object value)

Description:

Indicates whether the specified object (as an RdmParameter) is contained in the collection.

Parameters:

value

Type: System.Object

The RdmParameter to look for in the collection.

Return Value:

Type: System.Boolean

True if the RdmParameter is in the collection; otherwise False.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Contains

Page 206: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 206

Contains(RdmParameter) Method

Syntax:

public bool Contains(RdmParameter value)

Description:

Indicates whether an RdmParameter is contained in the collection.

Parameters:

value

Type: RdmParameter

The parameter to look for in the collection.

Return Value:

Type: System.Boolean

True if the RdmParameter is in the collection; otherwise False.

Page 207: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 207

Contains(string) Method

Syntax:

public bool Contains(string parameterName)

Description:

Indicates whether an RdmParameter with the specified name is contained in the collection.

Parameters:

value

Type: System.String

The name of the parameter to look for in the collection.

Return Value:

Type: System.Boolean

True if an RdmParameter with the specified name is in the collection; otherwise False.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Contains

Page 208: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 208

CopyTo(Array, int) Method

Syntax:

public void CopyTo(Array array, int index)

Description:

Copies an array of items to the collection starting at the specified index

Parameters:

array

Type: System.Array

The array of items to copy to the collection.

index

Type: System.Int32

The index in the collection at which to copy the items.

Exceptions:

Exception ConditionArgumentNullException The specified array is null.ArgumentOutOfRangeException The index is out of range for the collection.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.CopyTo

Page 209: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 209

CopyTo(RdmParameter[], int) Method

Syntax:

public void CopyTo(RdmParameter[] array, int index)

Description:

Copies an array of RdmParameters to the collection starting at the specified index

Parameters:

array

Type: RdmParameter[]

The array of parameters to copy to the collection.

index

Type: System.Int32

The index in the collection at which to copy the items.

Exceptions:

Exception ConditionArgumentNullException The specified array is null.ArgumentOutOfRangeException The index is out of range for the collection.

Page 210: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 210

GetEnumerator() Method

Syntax:

public IEnumerator GetEnumerator()

Description:

Provides an enumerator that allows simple iteration over the parameters stored in the parameter collection.

Parameters:

None

Return Value:

Type: System.Collections.IEnumerator

Returns an enumerator that can be used to iterate through the collection of parameters.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.GetEnumerator

Page 211: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 211

IndexOf(Object) Method

Syntax:

public int IndexOf(Object value)

Description:

Returns the index of the specified RdmParameter object within the parameter collection.

Parameters:

value

Type: System.Object

The RdmParameter object (as an Object) in the collection.

Return Value:

Type: System.Int32

The zero-based index of the specified parameter or -1 if the parameter is not found.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.IndexOf

Page 212: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 212

IndexOf(RdmParameter) Method

Syntax:

public int IndexOf(RdmParameter value)

Description:

Returns the index of the specified RdmParameter object within the parameter collection.

Parameters:

value

Type: RdmParameter

The RdmParameter object in the collection.

Return Value:

Type: System.Int32

The zero-based index of the specified parameter or -1 if the parameter is not found.

Page 213: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 213

IndexOf(string) Method

Syntax:

public int IndexOf(string parameterName)

Description:

Returns the index of the parameter within the parameter collection that contains the specified name.

Parameters:

parameterName

Type: System.String

The name of the parameter in the collection.

Return Value:

Type: System.Int32

The zero-based index of the specified parameter or -1 if the parameter is not found.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.IndexOf

Page 214: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 214

Insert(int, Object) Method

Syntax:

public void IndexOf(int index, Object value)

Description:

Inserts the specified parameter value(must be of type RdmParameter) into the parameter collection at index.

Parameters:

index

Type: System.Int32

The index in the array where the parameter should be inserted.

value

Type: System.Object

The parameter to be inserted.

Exceptions:

Exception ConditionArgumentException The specified value already exists in the collection.ArgumentException The value is not a valid RdmParameter.ArgumentOutOfRangeException The index specified is less than zero or greater than Count.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Insert

Page 215: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 215

Insert(int, RdmParameter) Method

Syntax:

public void IndexOf(int index, RdmParameter value)

Description:

Inserts the specified parameter value into the parameter collection at index.

Parameters:

index

Type: System.Int32

The index in the array where the parameter should be inserted.

value

Type: RdmParameter

The parameter to be inserted.

Exceptions:

Exception ConditionArgumentException The specified value already exists in the collection.ArgumentException The value is not a valid RdmParameter.ArgumentOutOfRangeException The index specified is less than zero or greater than Count.

Page 216: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 216

RemoveAt(int) Method

Syntax:

public void RemoveAt(int index)

Description:

Removes the parameter at the specified index from the parameter collection.

Parameters:

index

Type: System.Int32

The index of the parameter to be removed.

Exceptions:

Exception ConditionArgumentOutOfRangeException The index specified is less than zero or greater than Count.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.RemoveAt

Page 217: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 217

RemoveAt(string) Method

Syntax:

public void RemoveAt(string parameterName)

Description:

Removes the parameter at the specified index from the parameter collection.

Parameters:

parameterName

Type: System.String

The name of the parameter to be removed.

Return Value:

None. No information is returned if a parameter of the specified name existed or not.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.RemoveAt

Page 218: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 218

Remove(Object) Method

Syntax:

public void Remove(Object value)

Description:

Removes the specified parameter from the parameter collection.

Parameters:

value

Type: System.Object

The parameter to be removed.

Return Value:

None. No indication is given whether a parameter was removed or not.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Remove

Page 219: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 219

Remove(RdmParameter) Method

Syntax:

public void Remove(RdmParameter value)

Description:

Removes the specified parameter from the parameter collection.

Parameters:

value

Type: RdmParameter

The parameter to be removed.

Return Value:

None. No indication is given whether a parameter was removed or not.

Page 220: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 220

Count Property

Syntax:

public int Count { get; }

Description:

Type: System.Int32

Gets the number of parameters in the parameter collection.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Count

Page 221: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 221

IsFixedSize Property

Syntax:

public bool IsFixedSize { get; }

Description:

Type: System.Boolean

True if the collection is a fixed size; otherwise False.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.IsFixedSize

Page 222: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 222

IsReadOnly Property

Syntax:

public bool IsReadOnly { get; }

Description:

Type: System.Boolean

True if the collection is a read-only; otherwise False.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.IsReadOnly

Page 223: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 223

IsSynchronized Property

Syntax:

public bool IsSynchronized { get; }

Description:

Type: System.Boolean

True if the collection is a synchronized; otherwise False.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.IsSynchronized

Page 224: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 224

Item[int] Property

Syntax:

public RdmParameter this[int index] { get; set; }

Description:

Type: RdmParameter

Gets or sets the RdmParameter at the specified index

Parameters:

index

Type: System.Int32

The zero-based index of the parameter.

Exceptions:

Exception ConditionArgumentException The specified parameter is already contained in another collection.IndexOutOfRangeException The specified index does not exist

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Item(Int32)

Page 225: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 225

Item[string] Property

Syntax:

public RdmParameter this[string parameterName] { get; set; }

Description:

Type: RdmParameter

Gets or sets the RdmParameter with the specified name

Parameters:

parameterName

Type: System.String

The name of the parameter.

Exceptions:

Exception ConditionArgumentException The specified parameter is already contained in another collection.IndexOutOfRangeException A parameter of the specified name does not exist

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.Item(String)

Page 226: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmParameterCollection Class 226

SyncRoot Property

Syntax:

public Object SyncRoot{ get; }

Description:

Type: System.Object

Specifies the Object to be used to synchronize access to the collection

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbParameterCollection.SyncRoot

Page 227: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmRowUpdatedEventArgs Class 227

RdmRowUpdatedEventArgs ClassDescription:

The RdmRowUpdatedEventArgs class, derived from RowUpdatedEventArgs provides data for the RowUp-dated event of the ADO.NET Data Provider for RDM.

Public Constructors:

 l RdmRowUpdatedEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping)

Public Properties:

 l Command { get; } l Errors { get; }   (Inherited from RowUpdatedEventArgs) l RecordsAffected { get; }   (Inherited from RowUpdatedEventArgs) l Row { get; }   (Inherited from RowUpdatedEventArgs) l RowCount { get; }   (Inherited from RowUpdatedEventArgs) l StatementType { get; }   (Inherited from RowUpdatedEventArgs) l Status { get; }   (Inherited from RowUpdatedEventArgs) l TableMapping { get; }   (Inherited from RowUpdatedEventArgs)

Public Methods:

 l CopyToRows(DataRow[])   (Inherited from RowUpdatedEventArgs) l CopyToRows(DataRow[], int)   (Inherited from RowUpdatedEventArgs) l Equals(Object other)   (Inherited from Object) l GetHashCode()   (Inherited from Object) l GetType()   (Inherited from Object) l ToString()   (Inherited from Component)

Page 228: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmRowUpdatedEventArgs Class 228

RdmRowUpdatedEventArgs(DataRow, IDbCommand, State-mentType, DataTableMapping) Constructor

Syntax:

public RdmUpdatedEventArgs(DataRow dataRow,

IDbCommand command,

StatementType statementType,

DataTableMapping tableMapping)

Description:

Creates a new RdmRowUpdatedEventArgs object. This class does not need to be created by application pro-grams. It will be generated by the system when handling the RowUpdated event.

Parameters:

dataRow

Type: System.Data.DataRow

The DataRow sent through an Update method.

command

Type: System.Data.IDbCommand

The IDbCommand executed by an Update method.

statementType

Type: System.Data.StatementType

One of the StatementType values that specifies the type of SQL statement executed.

tableMapping

Type: System.Data.Common.DataTableMapping

The DataTableMapping sent through an Update method.

Page 229: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmRowUpdatedEventArgs Class 229

Command Property

Syntax:

public IDbCommand Command { get; }

Description:

Type: System.Data.IDbCommand

Gets the RdmCommand used to when an Update method is called to modify the database.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.RowUpdatedEventArgs.Command

Page 230: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmRowUpdatingEventArgs Class 230

RdmRowUpdatingEventArgs ClassDescription:

The RdmRowUpdatingEventArgs class, derived from RowUpdatingEventArgs provides data for the RowUp-dating event of the ADO.NET Data Provider for RDM.

Public Constructors:

 l RdmRowUpdatingEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping)

Public Properties:

 l Command { get; set; } l Errors { get; }   (Inherited from RowUpdatingEventArgs) l Row { get; }   (Inherited from RowUpdatingEventArgs) l StatementType { get; }   (Inherited from RowUpdatingEventArgs) l Status { get; }   (Inherited from RowUpdatingEventArgs) l TableMapping { get; }   (Inherited from RowUpdatingEventArgs)

Public Methods:

 l Equals(Object other)   (Inherited from Object) l GetHashCode()   (Inherited from Object) l GetType()   (Inherited from Object) l ToString()   (Inherited from Component)

Page 231: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmRowUpdatingEventArgs Class 231

RdmRowUpdatingEventArgs(DataRow, IDbCommand, State-mentType, DataTableMapping) Constructor

Syntax:

public RdmUpdatingEventArgs(DataRow dataRow,

IDbCommand command,

StatementType statementType,

DataTableMapping tableMapping)

Description:

Creates a new RdmRowUpdatedEventArgs object. This class does not need to be created by application pro-grams. It will be generated by the system when handling the RowUpdating event.

Parameters:

dataRow

Type: System.Data.DataRow

The DataRow sent through an Update method.

command

Type: System.Data.IDbCommand

The IDbCommand executed by an Update method.

statementType

Type: System.Data.StatementType

One of the StatementType values that specifies the type of SQL statement executed.

tableMapping

Type: System.Data.Common.DataTableMapping

The DataTableMapping sent through an Update method.

Page 232: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmRowUpdatingEventArgs Class 232

Command Property

Syntax:

public IDbCommand Command { get; set; }

Description:

Type: System.Data.IDbCommand

Gets the RdmCommand used to when an Update method is called to modify the database.

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.RowUpdatingEventArgs.Command

Page 233: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmTransaction Class 233

RdmTransaction ClassDescription:

The RdmTransaction class, derived from DbTransaction, represents a transaction, encapsulating multiple changes into a single action.

Public Properties:

 l Connection l IsolationLevel

Public Methods:

 l Commit() l CreateObjRef(Type requestedType)   (Inherited from MarshalByRefObject) l Dispose()   (Inherited from Component) l Equals(Object other)   (Inherited from Object) l GetHashCode()   (Inherited from Object) l GetLifetimeService()   (Inherited from MarshalByRefObject) l GetType()   (Inherited from Object) l InitializeLifetimeService()   (Inherited from MarshalByRefObject) l Rollback() l ToString()   (Inherited from Component)

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbTransaction

Page 234: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmTransaction Class 234

Commit() Method

Syntax:

public void Commit()

Description:

Commits the transaction.

Parameters:

None

Return Value:

None

Exceptions:

Exception ConditionInvalidOperationException The current transaction is not active (it was previously committed or rolled

back).

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbTransaction.Commit

Page 235: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmTransaction Class 235

Rollback() Method

Syntax:

public void Rollback()

Description:

Rolls back (aborts) the transaction.

Parameters:

None

Return Value:

None

Exceptions:

Exception ConditionInvalidOperationException The current transaction is not active (it was previously committed or rolled

back).

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbTransaction.Rollback

Page 236: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmTransaction Class 236

Connection Property

Syntax:

public RdmConnection Connection { get; }

Description:

Type: RdmConnection

Gets the connection that the current transaction is associated with.

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbTransaction.Connection

Page 237: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmTransaction Class 237

IsolationLevel Property

Syntax:

public IsolationLevel IsolationLevel{ get; }

Description:

Type: System.Data.IsolationLevel

Gets the isolation level that this transaction is using. The RDM Data Adapter directly supports the Iso-lationLevel.Serializable and Isolation.Snapshot isolation levels. All other isolation levels will be silently mapped to IsolationLevel.Serializable.

Exceptions:

None

Reference:

For more information, reference MSDN documentation for: Sys-tem.Data.Common.DbTransaction.IsolationLevel

Page 238: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmException Class 238

RdmException ClassDescription:

The RdmException class, derived from DbException, represents an error returned from the RDM SQL engine.

Public Properties:

 l Data  (Inherited from Exception) l ErrorCode  (Inherited from ExternalException) l HelpLink  (Inherited from Exception) l HResult  (Inherited from Exception) l InnerException  (Inherited from Exception) l Message  (Inherited from Exception) l Procedure l Source  (Inherited from Exception) l SqlState l StackTrace  (Inherited from Exception) l TargetSite  (Inherited from Exception)

Public Methods:

 l Equals(Object other)   (Inherited from Object) l GetBaseException()  (Inherited from Exception) l GetHashCode()   (Inherited from Object) l GetObjectData  (Inherited from Exception) l GetType()   (Inherited from Object) l ToString()   (Inherited from Component)

Reference:

System.Data.Common.DbException

Page 239: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmException Class 239

Procedure Property

Syntax:

public string Procedure{ get; }

Description:

Type: System.String

Returns the procedure that was being called when the error occurred.

Exceptions:

None

Page 240: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmException Class 240

SqlState Property

Syntax:

public string SqlState{ get; }

Description:

Type: System.String

Returns the SQL state associated with the error encountered.

Exceptions:

None

Page 241: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmDateFormat Enumeration 241

RdmDateFormat EnumerationDescription:

The RdmDateFormat enumeration is used to store information about what format should be used when the database engine is converting dates to strings. The enumeration has three values that correspond to SQL con-stants: YYYYMMDD, MMDDYYYY, and DDMMYYYY, which, as their names suggest, show the order that the month, day, and year portions are displayed as well as showing the number of digits that each will use. The default is YYYYMMDD.

Note that this has no impact when dates are retrieved as.NET Framework System.DateTime objects. In that case all the normal formatting abilities apply. This also does not affect dates that are returned by a query as dates but then converted to strings by the ADO.NET data provider. This only affects dates which are converted in the SQL engine to character strings.

Page 242: ADO .NET User's Guide - Raima

ADO.NET User Guide

RdmType Enumeration 242

RdmType EnumerationDescription:

The RdmType enumeration is used to indicate the data types that the SQL engine supports. The following data types are included.

Type name DescriptionAnsiString A single-byte ANSI stringString A Unicode stringBinary A binary arrayBoolean A booleanSByte A signed 8 bit integerInt16 A signed 16-bit integerInt32 A signed 32-bit integerInt64 A signed 64-bit integerSingle A 32-bit floating pointDouble A 64-bit floating pointDate A dateTime A timeTimestamp A date and time (with fractions of a second)Blob A binary large objectClob A character large object

Page 243: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 243

Glossary

B

B-treeAlso called a multiway tree, a B-tree is a fast data-indexing method that organizes the index into a multi-level set of nodes. Each node contains a sorted array of key values (the indexed data). Two important properties of a B-tree are that all nodes are at least half-full and that the tree is always balanced (that is, an identical number of nodes must be read in order to locate all keys at any given level in the tree). A well-organized B-tree will have only three or four levels.

bufferAn in-memory store of data read from a disk file, in which database operations are per-formed.

C

cacheA set of buffers used to optimize database input and output operations. All RDM Embedded database input and output is performed using a cache.

commitThe point at which database changes made during a single transaction are actually written to the database files.

compound keyA key field composed of any combination of fields (not necessarily contiguous) from a rec-ord. Each field of a compound key may be stored in ascending or descending order.

connectThe process of inserting a member record occurrence into a set occurrence.

currency tablesA table of database addresses maintained by the RDM Embedded runtime system for con-trolling record access and set navigation. The currency tables consist of the current member table, current owner table, and the current record.

current databaseThe database that is currently accessible by the RDM Embedded runtime functions when multiple databases have been opened. The current database is changed by the database number function argument or by function d_setdb.

Page 244: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 244

current memberContains, for each set, the database address of a record occurrence that is a valid member of that set. Usually, the current member of a set is the last record accessed using a set navi-gation function (d_findfm, d_findlm, d_findnm, or d_findpm).

current ownerContains for each set, the database address of a record occurrence that is a valid owner of that set. Usually, the current owner of a set is established using the set navigation function d_findco or by using a currency manipulation function.

current recordContains the database address of the most recently accessed record instance.

D

data fieldA field represents the basic unit of information storage in a database and is always defined to be an element of a record. A field has associated with it attributes such as name, type (for example, char or int), and length. Other terms used for field include: attribute, entity, or col-umn.

data fileAn RDM Embedded file defined in a DDL specification that contains occurrences of one or more record types.

databaseAn organized collection of related files.

database addressThe location in the database of a record occurrence, frequently referred to as a DB_ADDR. Composed of two numbers: the file index and the slot within the file. Either 4 or 8 bytes long.

database definition languageA programming-like language used to define the structure and content of a database. RDM Embedded's Database Definition Language has been designed to be used with the C pro-gramming language.

DDLA programming-like language used to define the structure and content of a database. RDM Embedded's Database Definition Language has been designed to be used with the C pro-gramming language.

Page 245: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 245

deadlockA situation in which multiple processes accessing the same database each hold locks needed by the other processes in such a way that none of the processes can proceed. Sometimes called deadly embrace.

delete chainA linked list containing deleted records or nodes to be reused when a new record or node is created.

dictionaryA repository containing a definition of the content and structure of a database. It is used by the RDM Embedded runtime library functions for accessing and manipulating information from that database.

disconnectThe process of removing a member record from a set occurrence.

document rootThe path to the directory under which all files will be stored. Within the domain of one TFS, no files outside of this path may be accessed.

domain nameThe "name" of a computer which has visibility to another computer. This may be a published name available on DNS servers and across the Internet, or an internal network name visible only within a workgroup. The "ping" utility must be able to locate the IP address associated with this name. In RDM Embedded, a server (tfserver, dbmirror, dbrep, or dbrepsql) may be located through the domain name of the computer it is running on, together with the port on which it is listening. A special domain name, "localhost" always refers to the same computer as the application is running on (IP address is always 127.0.0.1).

E

environment variableA programmer-specified operating system parameter that is used to identify configuration information to the runtime system.

F

fieldA field represents the basic unit of information storage in a database and is always defined to be an element of a record. A field has associated with it attributes such as name, type (for example, char or int), and length. Other terms used for field include: attribute, entity, or col-umn.

Page 246: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 246

fileThe primary physical storage unit into which a database is organized. In RDM Embedded, files are used to store records and keys.

H

hierarchical database modelA data representation in which the relationships between record types are formed from par-ent-child structures, such that a record type may have many child relationships but only one parent relationship.

I

indexA set of key values through which rapid retrieval of a record is provided, similar to the index of a book. The term is often used synonymously with key file.

K

keyA field through which rapid and/or sorted access to a record is desired.

key fileA file that only contains keys. It may, in fact, contain more than one index because multiple key types can be contained in a single RDM Embedded key file.

key scanThe process of performing an ordered traversal through all (or a subset of all) occurrences of a given key field.

L

localhostA special Domain Name that always refers to the computer on which the application soft-ware is running. It is the default domain name used by RDM Embedded utilities and runtime library.

lockA multi-user database synchronization mechanism, used to prevent simultaneous updates to shared data. Locks can be applied to the entire database or to files.

Page 247: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 247

loggingThe process of making a copy of the database changes made during a transaction prior to a commit. Logging is used to support the ability to perform a recovery in the event a failure occurs during a commit.

M

many-to-many relationshipA relationship between two record types, A and B, such that for each occurrence of type A, there are many related occurrences of type B and, for each occurrence of type B, there are many related occurrences of type A. In RDM Embedded, many-to-many relationships can be implemented using two one-to-many sets through a third, intersection record type.

member of setSpecifies a one-to-many relationship between record types. One occurrence of the owner record type is related to many occurrences of a member record type. Also called a set type.

member pointerStores set membership linkage information. There is one member pointer stored with a rec-ord per set for which the record is a member. Each one contains the database addresses of the owner record, previous member in the set, and next member in the set.

N

navigationThe process of retrieving records from a database by moving through various navigational methods. Methods include set navigation, key scanning, and record-type scanning.

network database modelA data representation in which the relationships are explicitly defined and maintained through sets of owner/members, where any given record type may be the owner of multiple types of sets and the member of multiple types of sets. Multiple set membership dis-tinguishes the Network database model from the Hierarchical database model.

nodeA component of a B-tree, consisting of a page of sorted keys stored in a key file.

O

occurrenceOne record instance within a record type, specifically associated with record type scanning (d_recfrst, d_recnext, d_recprev, d_reclast), where the current occurrence of a record type is used to bookmark the position on a record type scan. Record occurrences are ordered by

Page 248: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 248

their physical appearance in a data file. The current occurrence is not the same as the cur-rent record, although the current record will also be set by the scanning functions.

owner of setSpecifies a one-to-many relationship between record types. One occurrence of the owner record type is related to many occurrences of a member record type. Also called a set type.

P

pageFiles are blocked into contiguous fixed-length segments called pages. A page is the unit of database I/O performed in RDM Embedded.

path nameThe sequence of directories in a hierarchical file system that must be traversed to locate a particular file.

pointerIn a database, a pointer is data stored in a record occurrence that provides the necessary information for locating related record occurrences. In a C program, a pointer is a variable that contains a memory address.

portTogether with an IP address, a port number uniquely identifies an endpoint by which a TCP/IP connection can be made to another program. In RDM Embedded, each server (tfserver, dbmirror, dbrep or dbrepsql) identifies the port number that should be used to locate it. The IP address is normally obtained through a domain name lookup (e.g. tfs.raima.com is a domain name, and its IP address is 198.168.140.200).

processAn independently executing task or program. An individual execution of an RDM Embedded application program.

Q

queueA first-in-first-out waiting list. Lock requests for a locked resource will be placed at the end of a queue. When the locked resource becomes available, the first lock request on the queue will be granted.

Page 249: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 249

R

recordUsed synonymously with record type or record occurrence depending on the context in which the term is used.

record occurenceOne individual instance in a database of a record of a particular type. A database consists of many occurrences of many different record types. For example, an employee record type may consist of the fields name, employee_id, job_title, and pay. An employee record occur-rence could be "name: Jones, Jim; employee_id: c87101, job_title: engr, pay: 3400".

recoveryThe process of completing the transaction of a process that failed during a commit.

redundant dataIdentical data that is stored in multiple locations in a database. Typically used to form rela-tionships between tables in a relational database management system.

relational database modelA data representation in which a database is viewed as consisting of two-dimensional tables, each composed of one or more columns. Inter-table relationships are defined through use of common column names and data. Tables and columns are analogous to RDM Embedded records and fields, respectively.

remote procedure callA programming mechanism that makes a library call appear to operate in the program space of an application, even though the actual function exists in the program space of another pro-gram (called a "server"). A client application places a function identifier and parameter con-tents into a packet that is first transferred to the server, with results (return code, return parameter values) transferred back to the caller.

root nodeThe top or start node of a B-tree.

RPCA programming mechanism that makes a library call appear to operate in the program space of an application, even though the actual function exists in the program space of another pro-gram (called a "server"). A client application places a function identifier and parameter con-tents into a packet that is first transferred to the server, with results (return code, return parameter values) transferred back to the caller.

Page 250: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 250

runtime systemThe RDM Embedded C language library functions that perform all of the database access required by an application program while it is executing.

S

schemaA conceptual model of the structure of a database that defines the data contents and rela-tionships. A database definition language specification is an implementation of a particular schema.

setSpecifies a one-to-many relationship between record types. One occurrence of the owner record type is related to many occurrences of a member record type. Also called a set type.

set occurenceAn individual instance of a set in which one owner record occurrence has one or more member record occurrences connected to it.

set pointerStores set ownership linkage information. There is one set pointer stored with a record per set for which the record is an owner. Each one contains a count of the number of members in the set, the database address of the first member record occurrence, and the database address of the last member record occurrence in the set.

set scanThe process of performing an ordered traversal through all (or a subset of all) member rec-ord occurrences of a given set occurrence.

slotA position in a data or key file for storage of a single record or key occurrence.

synchronizationThe process of ensuring that, in a multi-user database environment, updates to shared data are performed serially, one user at a time.

system recordA special record type used to define the "top" record in a network database. There is only one occurrence of the system record in a database. It is defined by naming "system" as a set owner in one or more set definitions in the DDL. When a database is opened, the system record, if it exists, is set as the current owner of all sets for which it is named as owner. It may not be a set member.

Page 251: ADO .NET User's Guide - Raima

ADO.NET User Guide

Glossary 251

T

taskIn an RDM Embedded Application, a task is a block of allocated memory that stores the com-plete database context for a thread of execution. It must be allocated through the d_open-task function and closed through the d_closetask function. A task represents one user in a multi-user environment. A task can also represent one database transaction, with all locks and database updates associated with the transaction.

TFSA software component within the RDM Embedded system that maintains safe multi-user transactional updates to a set of files, and responds to page requests. The tfserver utility links to the TFS to allow it to run as a separate utility. The TFS may also be linked directly into an application in order to avoid the RPC overhead of calling a separate server.

threadAn independent flow of control within a computer operating system. Differentiated from a Process in that a process may contain one or more threads. Threads within the same proc-ess share common (or global) data but have their own stacks, which keeps track of the thread's context. In RDM Embedded Applications, each thread must be associated with its own task variable, and is treated as a separate user in a multi-user environment.

timeoutAn event that occurs when a lock request has waited on a queue longer than a pre-deter-mined amount of time. It is used to avoid deadlock.

transactionA group of related database changes that are written to the database as a single unit during a commit. The logical consistency of a database is maintained by placing all related updates within transactions.

transactional file serverA software component within the RDM Embedded system that maintains safe multi-user transactional updates to a set of files, and responds to page requests. The tfserver utility links to the TFS to allow it to run as a separate utility. The TFS may also be linked directly into an application in order to avoid the RPC overhead of calling a separate server.

Page 252: ADO .NET User's Guide - Raima

ADO.NET User Guide

Index 252

Index