rdms 8.4 ado .net interface guide

241
RDM Server 8.4 ADO .NET Interface Guide

Upload: doanthuy

Post on 05-Jan-2017

242 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: RDMs 8.4 ADO .NET Interface Guide

RDM Server 8.4

ADO .NET Interface Guide

Page 2: RDMs 8.4 ADO .NET Interface Guide

Trademarks

Raima®, Raima Database Manager®, RDM®, RDM Embedded® and RDM Server® are trademarks of Raima Inc. and may beregistered in the United States of America and/or other countries. All other names referenced herein may be trademarks oftheir respective owners.

This guide may contain links to third-party Web sites that are not under the control of Raima Inc. and Raima Inc. is notresponsible for the content on any linked site. If you access a third-party Web site mentioned in this guide, you do so at yourown risk. Inclusion of any links does not imply Raima Inc. endorsement or acceptance of the content of those third-party sites.

Page 3: RDMs 8.4 ADO .NET Interface Guide

Contents

ADO .NET User Guide i

Contents

Contents iIntroduction to ADO .NET 1Basic ADO.NET Application Steps 1Hello World! 2

Getting Started with ADO .NET 4Registering the Raima.Rdms.dll 4Command Line 4Visual Studio GUI 5Using DbProviderFactory 5

RdmsCommand Class 9RdmsCommand() Constructor 11RdmsCommand(RdmsConnection) Constructor 12RdmsCommand(string) Constructor 13RdmsCommand(string, RdmsConnection) Constructor 14IDbCommand.Connection Property 15IDbCommand.CreateParameter() Method 16IDbCommand.ExecuteReader() Method 17ExecuteReader(CommandBehavior) Method 18IDbCommand.Parameters Property 19IDbCommand.Transaction Property 20Cancel() Method 21CreateParameter() Method 22ExecuteNonQuery() Method 23ExecuteReader() Method 24ExecuteReader(CommandBehavior) Method 25ExecuteScalar() Method 26Prepare() Method 27CommandText Property 28CommandTimeout Property 29CommandType Property 30Connection Property 31Parameters Property 32Transaction Property 33UpdatedRowSource Property 34

RdmsConnection Class 35RdmsConnection() Constructor 37RdmsConnection(string) Constructor 38StateChange Event 39IDbConnection.BeginTransaction() Method 40IDbConnection.BeginTransaction(IsolationLevel) Method 41

Page 4: RDMs 8.4 ADO .NET Interface Guide

Contents

ADO .NET User Guide ii

IDbConnection.CreateCommand() Method 42BeginTransaction() Method 43BeginTransaction(IsolationLevel) Method 44BeginTransaction(string) Method 45BeginTransaction(string, IsolationLevel) Method 46ChangeDatabase(string) Method 47Close() Method 48CreateCommand() Method 49EnlistTransaction(Transaction) Method 50GetSchema() Method 51GetSchema(string) Method 52GetSchema(string, string[]) Method 53Open() Method 58AutoCommit Property 59ConnectionString Property 60Connection Timeout Property 61Database Property 62DataSource Property 63ServerVersion Property 64State Property 65

RdmsConnectionStringBuilder Class 66RdmsConnectionStringBuilder() Constructor 68RdmsConnectionStringBuilder(string) Constructor 69Add(string, Object) Method 70Clear() Method 71ContainsKey(string) Method 72EquivalentTo(DbConnectionStringBuilder) Method 73Remove(string) Method 74ShouldSerialize(string) Method 75TryGetValue(string, out Object) Method 76AutoCommit Property 77BrowsableConnectionString Property 78ConnectionString Property 79Count Property 80Database Property 81Host Property 82IsFixedSize Property 83IsReadOnly Property 84Item Property 85Keys Property 86Password Property 87

Page 5: RDMs 8.4 ADO .NET Interface Guide

Contents

ADO .NET User Guide iii

Port Property 88User Property 89Values Property 90

RdmsDataAdapter class 91RdmsDataAdapter() Constructor 93RdmsDataAdapter(RdmsCommand) Constructor 94RdmsDataAdapter(string, RdmsConnection) Constructor 95RdmsDataAdapter(string, string) Constructor 96RowUpdated Event 97RowUpdating Event 98IDbDataAdapter.DeleteCommand Property 99IDbDataAdapter.InsertCommand Property 100IDbDataAdapter.SelectCommand Property 101IDataAdapter.TableMappings Property 102IDbDataAdapter.UpdateCommand Property 103Fill(DataSet) Method 104Fill(DataTable) Method 105Fill(DataSet, string) Method 106Fill(int, int, DataTable[]) Method 107Fill(DataSet, int, int, string) Method 108FillSchema(DataSet, SchemaType) Method 109FillSchema(DataTable, SchemaType) Method 110FillSchema(DataSet, SchemaType, String) Method 111GetFillParameters() Method 112Update(DataRow[]) Method 113Update(DataSet) Method 114Update(DataTable) Method 115Update(DataSet, String) Method 116DeleteCommand Property 117InsertCommand Property 118SelectCommand Property 119UpdateBatchSize Property 120UpdateCommand Property 121

RdmsDataReader Class 122IDataRecord.GetData(int ordinal) Method 124Close() Method 125GetBoolean(int) Method 126GetByte(int) Method 127GetBytes(int, long, byte[], int, int) Method 128GetChar(int) Method 130GetChars(int, long, char[], int, int) Method 131

Page 6: RDMs 8.4 ADO .NET Interface Guide

Contents

ADO .NET User Guide iv

GetData(int) Method 133GetDataTypeName(int) Method 134GetDateTime(int) Method 135GetDecimal(int) Method 136GetDouble(int) Method 137GetEnumerator() Method 138GetFieldType(int) Method 139GetFloat(int) Method 140GetGuid(int) Method 141GetInt16(int) Method 142GetInt32(int) Method 143GetInt64(int) Method 144GetName(int) Method 145GetOrdinal(string) Method 146GetProviderSpecificFieldType(int) Method 147GetProviderSpecificValue(int) Method 148GetProviderSpecificValues(Object[]) Method 149GetSchemaTable() Method 150GetString(int) Method 151GetValue(int) Method 152GetValues(Object[]) Method 153IsDBNull(int) Method 154NextResult() Method 155Read() Method 156Command Property 157Depth Property 158FieldCount Property 159HasRows Property 160IsClosed Property 161Item[int] Property 162Item[string] Property 163RecordsAffected Property 164VisibleFieldCount Property 165

RdmsParameter Class 166RdmsParameter() Constructor 167RdmsParameter(string, Object) Constructor 168RdmsParameter(string, RdmsType) Constructor 169IDbDataParameter.Precision Property 170IDbDataParameter.Scale Property 171ResetDbType() Method 172ResetRdmsType() Method 173

Page 7: RDMs 8.4 ADO .NET Interface Guide

Contents

ADO .NET User Guide v

DbType Property 174Direction Property 175IsNullable Property 176ParameterName Property 177RdmsType Property 178Size Property 179SourceColumn Property 180SourceColumnNullMapping Property 181SourceVersion Property 182Value Property 183

RdmsParameterCollection Class 184IDataParameterCollection.Item[string] Property 186IList.Item[int] Property 187Add(Object) Method 188Add(RdmsParameter) Method 189AddRange(Array) Method 190AddRange(RdmsParameter[]) Method 191Add(string, Object) Method 192Add(string, RdmsType) Method 193Clear() Method 194Contains(Object) Method 195Contains(RdmsParameter) Method 196Contains(string) Method 197CopyTo(Array, int) Method 198CopyTo(RdmsParameter[], int) Method 199GetEnumerator() Method 200IndexOf(Object) Method 201IndexOf(RdmsParameter) Method 202IndexOf(string) Method 203Insert(int, Object) Method 204Insert(int, RdmsParameter) Method 205RemoveAt(int) Method 206RemoveAt(string) Method 207Remove(Object) Method 208Remove(RdmsParameter) Method 209Count Property 210IsFixedSize Property 211IsReadOnly Property 212IsSynchronized Property 213Item[int] Property 214Item[string] Property 215

Page 8: RDMs 8.4 ADO .NET Interface Guide

Contents

ADO .NET User Guide vi

SyncRoot Property 216RdmsRowUpdatedEventArgs Class 217

RdmsRowUpdatedEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping) Constructor 218Command Property 219

RdmsRowUpdatingEventArgs Class 220RdmsRowUpdatingEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping) Constructor 221Command Property 222

RdmsTransaction Class 223Commit() Method 224Rollback() Method 225Connection Property 226IsolationLevel Property 227

RdmException Class 228Procedure Property 229SqlState Property 230RdmsRowUpdatedEventHandler Delegate 231RdmsRowUpdatingEventHandler Delegate 232

RdmsType Enumeration 233

Page 9: RDMs 8.4 ADO .NET Interface Guide

Introduction to ADO .NET

ADO .NET User Guide 1

Introduction to ADO .NETThe RDMs database management system (DBMS) is designed to provide powerful, flexible, high-performance capabilities fordeveloping embedded database applications. By combining the network and relational model technologies in a single system,RDMs lets you organize and access information efficiently, regardless of the complexity of the data. The Native RDMs C APIprovides an efficient low-level interface with a rich set of functionality.

The ADO.NET interface to RDMs is designed to allow developers to access this powerful DBMS from ADO.NET and there-fore 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 referenceddirectly. The following classes encompass the RDM Server Data Provider.

l RdmsConnection classl RdmsConnectionStringBuilder Classl RdmsCommand classl RdmsDataReader classl RdmsParameter classl RdmsParameterCollection classl RdmsDataAdapter classl RdmsTransaction classl RdmsException Classl RdmsType enumerationl RdmsRowUpdatedEventArgs classl RdmsRowUpdatingEventArgs classl RdmsRowUpdatedEventHandler delegatel RdmsRowUpdatingEventHandler 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 asoutlined 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-

t=localhost;database=hello_worldADO"b. Create an RdmsConnection object to handle your connection to the Raima database system and pass in your

connection string to the constructor.c. Create an RdmsCommand object to handle your SQL commands you wish to use to interact with the RDMs

database system.d. Create an RdmsTransaction object to handle your transactions within the RDMs database system.e. Create an RdmsDataReader object to handle reading out data from the RDMs database system.f. Call the Open function of the RdmsConnection object in order to open your database.

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

executed by your application.

Page 10: RDMs 8.4 ADO .NET Interface Guide

Introduction to ADO .NET

ADO .NET User Guide 2

b. Create some RdmsParameter objects for any parameters you will need for any parameter markers that were spe-cified 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 RdmsCommand object to execute the appropriate statements that implement thedatabase access needs for each particular function. Alternatively you can call ExecuteScalar to execute a state-ment and return the first column of the first row of results.

b. Call transaction statements using the RdmsTransaction class in order to start the transaction, commit the trans-action, create a savepoint, or rollback a transaction.

c. Call ExecuteReader to retrieve the result rows from an executed select statement. You iterate over the resultsusing the RdmsDataReader object.

4. When your application is ready to terminate you need to…a. Call Close on the RdmsDataReader object you used if you read from one.b. Call Close on the RdmsConnection 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 theretrieve 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 res-ults are.

/*********************************************************************** HELLO WORLD ADO.NET** ---------------** This document describes the process to open a simple database, insert a record** containing a text field, read the text field from database and print it out.**********************************************************************/

using System;using Raima.Rdms; /* The RDM ADO.NET API */using System.Data;

namespace HelloWorldApplication{

class HelloWorld{

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 */RdmsConnection connection = new RdmsConnection(connectionString)/* Create a command object to call SQL queries */RdmsCommand command = connection.CreateCommand();/* Create a transaction object to start and stop transactions */RdmsTransaction rdmtrans = null;

Page 11: RDMs 8.4 ADO .NET Interface Guide

Introduction to ADO .NET

ADO .NET User Guide 3

/* Create a reader object to read out data from the SQL query */RdmsDataReader 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 12: RDMs 8.4 ADO .NET Interface Guide

Getting Started with ADO .NET

ADO .NET User Guide 4

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 correctly. Ifyou follow the steps below, you will be able to execute your application correctly in both the command line and Visual Stu-dio GUI interfaces. There are also directions on using the DbProviderFactory class.

Registering the Raima.Rdms.dll1. Open a command prompt with Administrator permissions and navigate to the installation directory for the Raima

product2. Run gacutil /i Raima.Rdms.dll

Command Line1. 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 install dir-

ectory\Win32 or Win64\Raima.Rdms.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)

Page 13: RDMs 8.4 ADO .NET Interface Guide

Getting Started with ADO .NET

ADO .NET User Guide 5

Visual Studio GUI1. 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.Rdms.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.Rdms.dll

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

Using DbProviderFactory1. 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 commandline section.

2. Navigate to that folder in your Windows directory.

Page 14: RDMs 8.4 ADO .NET Interface Guide

Getting Started with ADO .NET

ADO .NET User Guide 6

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

Page 15: RDMs 8.4 ADO .NET Interface Guide

Getting Started with ADO .NET

ADO .NET User Guide 7

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 Server Data Provider" invariant="Raima.Rdms"description=".NET Framework Data Provider for RDM" type="Raima.Rdm.RdmProviderFactory,Raima.Rdm, Version=8.4.0.0, Culture=neutral, PublicKeyToken=24dc3c5b05a2b501"/>

The Version in the above text must match the released version number in the Raima.Rdms.dll. Use Visual Studio toobtain this number by opening Raima.Rdms.dll and double-click on the line that says "1.0 Neutral".

Page 16: RDMs 8.4 ADO .NET Interface Guide

Getting Started with ADO .NET

ADO .NET User Guide 8

The Version string can be obtained from the AssemblyVersion or FileVersion properties.

Page 17: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 9

RdmsCommand Class

Description:

The RdmsCommand 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 RdmsCommand object can be created by directly callingthe constructor or via the generic DbProviderFactory.CreateCommand() method.

Public Constructors:

l RdmsCommand()l RdmsCommand(RdmsConnection connection)l RdmsCommand(string commandText)l RdmsCommand(string commandText, RdmsConnection 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)l GetLifetimeService() (Inherited from MarshalByRefObject)l GetType() (Inherited from Object)l InitializeLifetimeService() (Inherited from MarshalByRefObject)

Page 18: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 10

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 19: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 11

RdmsCommand() Constructor

Syntax:

public RdmsCommand()

Description:

The default constructor for the RdmsCommand class. Specifying a new RdmsCommand object with this constructor generatesa new command object with an empty CommandText and with the new RdmsCommand not being associated with any con-nection. An association with an RdmsConnection needs to be made before the new command object can be used.

Page 20: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 12

RdmsCommand(RdmsConnection) Constructor

Syntax:

public RdmsCommand(RdmsConnection connection)

Description:

A constructor for the RdmsCommand class. Specifying a new RdmsCommand object with this constructor generates a newcommand object with an empty CommandText and with the new RdmsCommand being associated with the specified Rdm-sConnection.

Parameters:

connection

Type: RdmsConnection

Specifies the RdmsConnection this command is associated with.

Page 21: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 13

RdmsCommand(string) Constructor

Syntax:

public RdmsCommand(string commandText)

Description:

A constructor for the RdmsCommand class. Specifying a new RdmsCommand object with this constructor generates a newcommand object with the specified CommandText and with the new RdmsCommand being associated with the specifiedRdmsConnection.

Parameters:

commandText

Type: System.String

Specifies the command text to use for this command.

Page 22: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 14

RdmsCommand(string, RdmsConnection) Constructor

Syntax:

public RdmsCommand(String commandText, RdmsConnection connection)

Description:

A constructor for the RdmsCommand class. Specifying a new RdmsCommand object with this constructor generates a newcommand object with the specified CommandText and with the new RdmsCommand being associated with the specifiedRdmsConnection.

Parameters:

commandText

Type: System.String

Specifies the command text to use for this command.

connection

Type: RdmsConnection

Specifies the RdmsConnection this command is associated with.

Page 23: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 15

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 RdmsCommand instance is castto an IDbCommand interface.

Reference:

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

Page 24: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 16

IDbCommand.CreateParameter() Method

Syntax:

IDbDataParameter IDbCommand.CreateParameter()

Description:

Creates a new instance of an RdmsParameter object.

This method is an explicit interface member implementation and can only be used when the RdmsCommand instance is castto an IDbCommand interface.

Return Value:

Type: System.Data.IDbDataParameter

The new RdmsParameter object.

Reference:

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

Page 25: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 17

IDbCommand.ExecuteReader() Method

Syntax:

IDataReader IDbCommand.ExecuteReader()

Description:

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

This method is an explicit interface member implementation and can only be used when the RdmsCommand instance is castto an IDbCommand interface.

Return Value:

Type: System.Data.IDataReader

An RdmsDataReader used to retrieve the results.

Exceptions:

Exception ConditionNotSupportedException If the behavior supplied is CommandBehavior.KeyInfo which is not currently

supportedRdmException The SQL engine encountered an error processing the command.

Reference:

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

Page 26: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 18

ExecuteReader(CommandBehavior) Method

Syntax:

IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior)

Description:

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

This method is an explicit interface member implementation and can only be used when the RdmsCommand instance is castto an IDbCommand interface.

Parameters:

behavior

Type: System.Data.CommandBehavior

Specifies the particular behavior for executing the command.

Return Value:

Type: System.Data.IDataReader

An RdmsDataReader 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(CommandBehavior)

Page 27: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 19

IDbCommand.Parameters Property

Syntax:

IDataParameterCollection IDbCommand.Parameters { get; }

Description:

Type: IDataParameterCollection

Gets the collection of RdmsParameter objects associated with this command.

This property is an explicit interface member implementation and can only be used when the RdmsCommand instance is castto an IDbCommand interface.

Reference:

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

Page 28: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 20

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 excep-tion. The proper way to add a command to a transaction is to create the transaction at the connection level which will auto-matically put all associated commands into the transaction.

This property is an explicit interface member implementation and can only be used when the RdmsCommand instance is castto an IDbCommand interface.

Exceptions:

Exception ConditionArgumentException The value is not a valid RdmsParameter.NotSupportedException If an attempt wasmade to set the transaction. RDMServer only supports set-

ting the transaction via RdmsConnection.BeginTransaction().

Reference:

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

Page 29: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 21

Cancel() Method

Syntax:

public void Cancel()

Description:

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

Reference:

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

Page 30: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 22

CreateParameter() Method

Syntax:

public RdmsParameter CreateParameter()

Description:

Creates a new instance of an RdmsParameter object.

Return Value:

Type: RdmsParameter

The new RdmsParameter object.

Reference:

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

Page 31: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 23

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 for INSERT, UPDATE, or DELETE statements. Any other statements return -1.

Exceptions:

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

Reference:

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

Page 32: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 24

ExecuteReader() Method

Syntax:

public RdmsDataReader ExecuteReader()

Description:

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

Return Value:

Type: RdmsDataReader

An RdmsDataReader used to retrieve the results.

Exceptions:

Exception ConditionNotSupportedException If the behavior supplied is CommandBehavior.KeyInfo which is not currently

supportedRdmException The SQL engine encountered an error processing the command.

Reference:

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

Page 33: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 25

ExecuteReader(CommandBehavior) Method

Syntax:

public RdmsDataReader ExecuteReader(CommandBehavior behavior)

Description:

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

Parameters:

behavior

Type: System.Data.CommandBehavior

Specifies the particular behavior for executing the command.

Return Value:

Type: RdmsDataReader

Exceptions:

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

Reference:

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

Page 34: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 26

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 or null if the first column in the first row is not available.

Exceptions:

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

Reference:

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

Page 35: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 27

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 pre-paration 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 36: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 28

CommandText Property

Syntax:

public string CommandText { get; set; }

Description:

Type: System.String

Exceptions:

None

Reference:

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

Page 37: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 29

CommandTimeout Property

Syntax:

public string CommandTimeout{ get; set; }

Description:

Type: System.Int32

Exceptions:

Exception ConditionArgumentException If the timeout value specified is less than zero.NotSupportedException If the timeout is greater than zero (RDMServer does not support command

timeouts).

Reference:

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

Page 38: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 30

CommandType Property

Syntax:

public CommandType CommandType { get; set; }

Description:

Type: System.Data.CommandType

Exceptions:

Exception ConditionNotSupportedException If the command type specified is CommandType.TableDirect.

Reference:

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

Page 39: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 31

Connection Property

Syntax:

public RdmsConnection Connection { get; set; }

Description:

Type: RdmsConnection

Exceptions:

None

Reference:

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

Page 40: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 32

Parameters Property

Syntax:

public RdmsParameterCollection Parameters { get; }

Description:

Type: RdmsParameterCollection

Exceptions:

None

Reference:

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

Page 41: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 33

Transaction Property

Syntax:

public RdmsTransaction Transaction { get; set; }

Description:

Type: RdmsTransaction

Exceptions:

Exception ConditionNotSupportedException If an attempt wasmade to set the transaction. RDMServer only supports set-

ting the transaction via RdmsConnection.BeginTransaction().

Reference:

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

Page 42: RDMs 8.4 ADO .NET Interface Guide

RdmsCommand Class

ADO .NET User Guide 34

UpdatedRowSource Property

Syntax:

public UpdateRowSource UpdatedRowSource{ get; set; }

Description:

Type: System.Data.UpdateRowSource

Exceptions:

None

Reference:

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

Page 43: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 35

RdmsConnection Class

Description:

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

Public Constructors:

l RdmsConnection()l RdmsConnection(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 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)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)

Page 44: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 36

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 45: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 37

RdmsConnection() Constructor

Syntax:

public RdmsConnection()

Description:

The default constructor for the RdmsConnection class. Specifying a new RdmsConnection object with this constructor gen-erates a new connection object with an empty ConnectionString.

Parameters:

None

Exceptions:

None

Page 46: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 38

RdmsConnection(string) Constructor

Syntax:

public RdmsConnection(string connectionString)

Description:

A constructor for the RdmsConnection class. Specifying a new RdmsConnection object with this constructor generates a newconnection 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 of the connection string do not follow the <key>-

>=<value> format.ArgumentException A key specified the connection string is not recognized.ArgumentException A value specified in the connection string is not appropriate for the related

key.

Page 47: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 39

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: System.Data.Common.DbConnection.StateChange

Page 48: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 40

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 becommitted 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 (Isol-ationLevel.Serializable).

This method is an explicit interface member implementation and can only be used when the RdmsConnection instance is castto 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 49: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 41

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 becommitted 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 RdmsConnection instance is castto an IDbConnection interface.

Parameters:

isolationLevel

Type: System.Data.IsolationLevel

Specifies the isolation level for the transaction. The RDM Server Data Adapter directly supports the Isol-ationLevel.Serializable isolation level. All other isolation levels will be silently mapped to Isol-ationLevel.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 50: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 42

IDbConnection.CreateCommand() Method

Syntax:

IDbCommand IDbConnection.CreateCommand()

Description:

Creates a new RdmsCommand object associated with the current connection.

This method is an explicit interface member implementation and can only be used when the RdmsConnection instance is castto an IDbConnection interface.

Return Value:

System.Data.IDbCommand

Reference:

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

Page 51: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 43

BeginTransaction() Method

Syntax:

public RdmsTransaction BeginTransaction()

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be com-mitted 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 (IsolationLevel.Serializable).

Parameters:

None

Return Value:

Type: RdmsTransaction

Exceptions:

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

Reference:

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

Page 52: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 44

BeginTransaction(IsolationLevel) Method

Syntax:

public RdmsTransaction BeginTransaction(IsolationLevel isolationLevel)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be com-mitted 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 Server Data Adapter directly supports the Isol-ationLevel.Serializable isolation level. All other isolation levels will be silently mapped to Isol-ationLevel.Serializable.

Return Value:

Type: RdmsTransaction

Exceptions:

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

Reference:

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

Page 53: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 45

BeginTransaction(string) Method

Syntax:

public RdmsTransaction BeginTransaction(String transactionName)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be com-mitted 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 (Isol-ationLevel.Serializable).

Parameters:

transactionName

Type: System.String

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

Return Value:

Type: RdmsTransaction

Exceptions:

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

Page 54: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 46

BeginTransaction(string, IsolationLevel) Method

Syntax:

public RdmsTransaction BeginTransaction(String transactionName, IsolationLevel isolationLevel)

Description:

The BeginTransaction method creates a new transaction that can be used to combine changes into a unit that can be com-mitted 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 Server Data Adapter directly supports the Isol-ationLevel.Serializable isolation level. All other isolation levels will be silently mapped to Isol-ationLevel.Serializable.

Return Value:

Type: RdmsTransaction

Exceptions:

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

Page 55: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 47

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: System.Data.Common.DbConnection.ChangeDatabase

Page 56: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 48

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 57: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 49

CreateCommand() Method

Syntax:

public RdmsCommand CreateCommand()

Description:

Creates a new RdmsCommand object associated with the current connection.

Parameters:

None

Return Value:

RdmsCommand

Exceptions:

None

Reference:

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

Page 58: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 50

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 RDMs 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: System.Data.Common.DbConnection.CreateCommand

Page 59: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 51

GetSchema() Method

Syntax:

public DataTable GetSchema()

Description:

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

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

Parameters:

None

Return Value:

System.Data.DataTable

Exceptions:

Exception ConditionRdmException The SQL engine could not access themeta data. Thismay occur if a trans-

action is active for the connection.

Reference:

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

Page 60: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 52

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. Themethod 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 themeta data. Thismay occur if a trans-

action is active for the connection.ArgumentNullException If the collectionName is nullArgumentOutOfRangeException If the collectionName is not a valid value

Reference:

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

Page 61: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 53

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. Themethod operates identically to calling GetSchema(collectionName, null).

Here are the available collection names.

Collection Name DescriptionDataTypes Returns information about the types supported by the RDMs 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 controlwhich rows show up in the table. For instance, the Table collection has three restrictions – one for the database name, one forthe table name, and one for the column name. Each is optional. You can query for all the columns in a table by specifying thedatabase name as restriction one, the table name as restriction two and null as restriction three. If you want to query for onecolumn, specify all three restriction values. To specify the second or subsequent restriction, each of the previous restrictionsmust 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 RDMs type. 0

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

ColumnSize Int64 The maximum length for the type.CreateFormat String A string representing how to create this type in a

CREATE TABLE statement, containing para-meter markers (i.e. {0} or {1}) for each differentparameter type.

CreateParameters String A comma separated list of parameters required tospecify the type in a CREATE TABLE statement.

DataType String The .NET Framework data type that correspondsto the RDMs type.

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

Page 62: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 54

Column Name Type Description Restriction IndexIsBestMatch Boolean Indicates that the particular RDMs type is the

best match for the associated .NET Frameworktype. Multiple RDMs types can match to a single.NET Framework type and when they do, onlyone of them should have the IsBestMatch columnset to true.

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

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

IsFixedPrecisionScale Boolean True if the data type has a fixed precision andscale 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 valueIsSearchable 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 maximum

number of digits allowed to the right of thedecimal point. Otherwise it is DbNull.Value.

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

IsConcurrencyType Boolean True if the data type is updated by the databaseevery time a row is modified, false if it is not,and DbNull.Value if the database does not sup-port 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 data

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 columnDataType 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.

Page 63: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 55

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 theassociated primary key

PrimaryKeyName String The name of the associated primary keyUpdateRule Int16 0 – indicates that the change will be cas-

caded1 – indicates that the value will bechanged to null2 – indicates that the update will cause afailure

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

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

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

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

Page 64: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 56

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.

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 themeta data. Thismay occur if a trans-

action is active for the connection.ArgumentNullException If the collectionName is null

Page 65: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 57

Exception ConditionArgumentOutOfRangeException If the collectionName is not a valid value

Reference:

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

Page 66: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 58

Open() Method

Syntax:

public void Open()

Description:

Opens the connection using the current ConnectionString value.

Exceptions:

Exception ConditionRdmException A transaction was already in progresswhen auto commit was disabled

Reference:

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

Page 67: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 59

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 star-ted explicitly or not. If auto commit is on then each executed statement will automatically start and end a transaction if anexisting transaction is not already started. Explicit transactions can still be created but are not required. If auto commit is noton 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 changesthat 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.

This property can be changed when the connection is open or closed. If the connection is open, attempting to enable autocommit mode while in the middle of an existing transaction will generate an exception. Changing this property when the con-nection is closed will cause the next open to use the specified method.

Setting the ConnectionString will override the current value of this property with the auto commit mode specified in the con-nection string, or by the default if none is specified.

Exceptions:

Exception ConditionInvalidOperationException A transaction was active when attempting to change the auto commit mode.RdmException A database error occurred while attempting to change the auto commit

mode.

Page 68: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 60

ConnectionString Property

Syntax:

public string ConnectionString { get; set; }

Description:

Type: System.String

Gets or sets the connection string. A connection string provides information on how to access the database as well as con-nection parameters. The string is made up of key, value pairs separated by semicolons; i.e. "<key>=<value>;[<key>->=<value>…]". The following keys are recognized.

Key(s) Value Comments

HostnameHost Name

<hostname> The hostname (in name or IP address format) of the server to communicatewith. If not specified, ‘localhost’ is assumed.

Port <number> The port number to use to communicate with the server. If not specified 1530is assumed.

User <string> The user name used to login to the server. No default.

Password <string> The password for the specified user when logging in to the server.

Database <string> Optional. A database to open when the connection is established.

AutoCommitAuto Commit

true|falseon|off1|0

Optional setting to specify whether auto commit is enabled for the con-nection.

The connection string cannot be changed while the connection is open.

Exceptions:

Exception ConditionArgumentException One or more parts of the connection string do not follow the <key>-

>=<value> format.ArgumentException A key specified the connection string is not recognized.ArgumentException A value specified in the connection string is not appropriate for the related

key.

Reference:

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

Page 69: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 61

Connection Timeout Property

Syntax:

public int ConnectionTimeout { get; }

Description:

Type: System.Int32

Gets the time (in seconds) to wait for a connection to open. This value is not used by the RDMs Data Provider.

Exceptions:

None

Reference:

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

Page 70: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 62

Database Property

Syntax:

public string Database { get; }

Description:

Type: System.String

Gets the currently open database name, or, if the connection is not yet open, the name of the database to be opened auto-matically when the connection is opened. This can be set using ConnectionString property or via the ChangeDatabase()method.

Exceptions:

None

Reference:

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

Page 71: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 63

DataSource Property

Syntax:

public string DataSource { get; }

Description:

Type: System.String

Gets the currently data source name. This property is not used by the RDMs Data Provider.

Exceptions:

None

Reference:

System.Data.Common.DbConnection.DataSource

Page 72: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 64

ServerVersion Property

Syntax:

public string ServerVersion { get; }

Description:

Type: System.String

Gets the version of RDM Server that is being used.

Exceptions:

Exception ConditionInvalidOperationException If the server version was requested when the connection was not open.

Reference:

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

Page 73: RDMs 8.4 ADO .NET Interface Guide

RdmsConnection Class

ADO .NET User Guide 65

State Property

Syntax:

public ConnectionState State { get; }

Description:

Type: System.Data.ConnectionState

Gets the current connection state which, for the RDMs Data Provider, can be either ConnectionState.Open or Con-nectionState.Closed.

Exceptions:

None

Reference:

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

Page 74: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 66

RdmsConnectionStringBuilder Class

Description:

The RdmsConnectionStringBuilder class, derived from DbConnectionStringBuilder, provides a simple way to create and man-age the contents of connections strings used by the RdmsConnection class.

Public Constructors:

l RdmsConnectionStringBuilder()l RdmsConnectionStringBuilder(string connectionString)

Public Properties:

l AutoCommitl BrowsableConnectionStringl ConnectionStringl Countl Databasel Hostl IsFixedSizel IsReadOnlyl Iteml Keysl Passwordl Portl Userl Values

Public Methods:

l Addl Clearl ContainsKeyl Equals(Object other) (Inherited from Object)l EquivalentTol GetHashCode() (Inherited from Object)l GetType() (Inherited from Object)l Removel ShouldSerializel ToString() (Inherited from Component)l TryGetValue(string, out Object)

Page 75: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 67

Reference:

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

Page 76: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 68

RdmsConnectionStringBuilder() Constructor

Syntax:

public RdmsConnectionStringBuilder()

Description:

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

Parameters:

None

Exceptions:

None

Page 77: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 69

RdmsConnectionStringBuilder(string) Constructor

Syntax:

public RdmsConnectionStringBuilder(string connectionString)

Description:

A constructor for the RdmsConnectionStringBuilder class. Specifying a new RdmsConnectionStringBuilderobject with this constructor generates a new connection string object with the specified connection string. If the connectionstring 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 of the connection string do not follow the <key>-

>=<value> format.ArgumentException A key specified the connection string is not recognized.ArgumentException A value specified in the connection string is not appropriate for the related

key.

Page 78: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 70

Add(string, Object) Method

Syntax:

public void Add(string keyword, Object value)

Description:

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

Parameters:

keyword

Type: System.String

The key to add to the RdmsConnectionStringBuilder.

value

Type: System.Object

The value for the specified key

Return Value:

None

Exceptions:

Exception ConditionArgumentException One or more parts of the connection string do not follow the <key>-

>=<value> format.ArgumentException A key specified the connection string is not recognized.ArgumentException A value specified in the connection string is not appropriate for the related

key.

Reference:

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

Page 79: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 71

Clear() Method

Syntax:

public void Clear()

Description:

Clears the contents of the RdmsConnectionStringBuilder. 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: System.Data.Common.DbConnectionStringBuilder.Clear

Page 80: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 72

ContainsKey(string) Method

Syntax:

public bool ContainsKey(string keyword)

Description:

Determines whether the RdmsConnectionStringBuilder contains a specific key.

Parameters:

keyword

Type: System.String

The key to locate in the RdmsConnectionStringBuilder.

Return Value:

Type: System.Boolean

Returns true if the RdmsConnectionStringBuilder 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: System.Data.Common.DbConnectionStringBuilder.ContainsKey

Page 81: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 73

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 supplied con-nection 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; otherwiseit returns false.

Exceptions:

None

Reference:

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

Page 82: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 74

Remove(string) Method

Syntax:

public bool Remove(string keyword)

Description:

Removes the entry with the specified key from the RdmsConnectionStringBuilder.

Parameters:

keyword

Type: System.String

The key to remove in the RdmsConnectionStringBuilder.

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: System.Data.Common.DbConnectionStringBuilder.Remove

Page 83: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 75

ShouldSerialize(string) Method

Syntax:

public bool ShouldSerialize(string keyword)

Description:

Determines whether the RdmsConnectionStringBuilder contains a specific key.

Parameters:

keyword

Type: System.String

The key to locate in the RdmsConnectionStringBuilder.

Return Value:

Type: System.Boolean

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

Exceptions:

Exception ConditionArgumentNullException The key specified is null.

Reference:

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

Page 84: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 76

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 RdmsConnectionStringBuilder

Parameters:

keyword

Type: System.String

The key to locate in the RdmsConnectionStringBuilder.

value

Type: System.Object

The value for the specified key

Return Value:

Type: System.Boolean

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

Exceptions:

Exception ConditionArgumentNullException The key specified is null.

Reference:

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

Page 85: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 77

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 star-ted explicitly or not. If auto commit is on then each executed statement will automatically start and end a transaction if anexisting transaction is not already started. Explicit transactions can still be created but are not required. If auto commit is noton 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 changesthat 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 86: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 78

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 useVisual Studio designers.

Exceptions:

None

Reference:

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

Page 87: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 79

ConnectionString Property

Syntax:

public string ConnectionString { get; set; }

Description:

Type: System.String

Gets or sets the connection string. A connection string provides information on how to access the database as well as con-nection parameters. The string is made up of key, value pairs separated by semicolons; i.e. "<key>=<value>;[<key>->=<value>…]". The following keys are recognized.

Key(s) Value Comments

HostnameHost Name

<hostname> The hostname (in name or IP address format) of the server to communicatewith. If not specified, ‘localhost’ is assumed.

Port <number> The port number to use to communicate with the server. If not specified 1530is assumed.

User <string> The user name used to login to the server. No default.

Password <string> The password for the specified user when logging in to the server.

Database <string> Optional. A database to open when the connection is established.

AutoCommitAuto Commit

true|falseon|off1|0

Optional setting to specify whether auto commit is enabled for the con-nection.

Exceptions:

Exception ConditionArgumentException One or more parts of the connection string do not follow the <key>-

>=<value> format.ArgumentException A key specified the connection string is not recognized.ArgumentException A value specified in the connection string is not appropriate for the related

key.

Reference:

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

Page 88: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 80

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: System.Data.Common.DbConnectionStringBuilder.Count

Page 89: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 81

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 90: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 82

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 on which host the server pro-cess is running that the ADO.NET Data Provider should connect to. This value can be specified by name or by IP Address. Ifnot specified, the default is ‘localhost’.

Exceptions:

None

Page 91: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 83

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: System.Data.Common.DbConnectionStringBuilder.IsFixedSize

Page 92: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 84

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: System.Data.Common.DbConnectionStringBuilder.IsReadOnly

Page 93: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 85

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 ref-erence 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.

Reference:

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

Page 94: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 86

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, howeverthe 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 RdmsConnectionStringBuilder are reflected in the col-lection returned from this property.

Exceptions:

None

Reference:

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

Page 95: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 87

Password Property

Syntax:

public string Password{ get; set; }

Description:

Type: System.String

Gets or sets the current password information in the connection string. The password information specifies the password asso-ciated with the user credentials to use when connecting to the server process. This user account must have been created on theserver prior to connecting to the server.

Exceptions:

None

Page 96: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 88

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 controls which port to use when com-municating with the server process.

Exceptions:

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

Page 97: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 89

User Property

Syntax:

public string User{ get; set; }

Description:

Type: System.String

Gets or sets the current user information in the connection string. The user information specifies which user credentials to usewhen connecting to the server process. This user account must have been created on the server prior to connecting to theserver.

Exceptions:

None

Page 98: RDMs 8.4 ADO .NET Interface Guide

RdmsConnectionStringBuilder Class

ADO .NET User Guide 90

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, howeverthe 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 RdmsConnectionStringBuilder are reflected in the col-lection returned from this property.

Exceptions:

None

Reference:

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

Page 99: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 91

RdmsDataAdapter class

Description:

The RdmsDataAdapter class, derived from DbDataAdapter, is a class that servers as a bridge between a DataTable or DataSetand the data in an RDMs database. Data is moved from the database to the DataTable or DataSet when a Fill method is calledand changes are made back to the database when an Update method is called.

Public Constructors:

l RdmsDataAdapter()l RdmsDataAdapter(RdmsCommand selectCommand)l RdmsDataAdapter(string sql, RdmsConnection conn)l RdmsDataAdapter(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)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)

Page 100: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 92

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 FillError (Inherited from DataAdapter)l RowUpdatedl RowUpdating

Explicit Interface Implementations:

l IDataAdapter.TableMappingsl IDbDataAdapter.DeleteCommandl IDbDataAdapter.InsertCommandl IDbDataAdapter.SelectCommandl IDbDataAdapter.UpdateCommand

Page 101: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 93

RdmsDataAdapter() Constructor

Syntax:

public RdmsDataAdapter()

Description:

The default constructor for the RdmsDataAdapter class. Specifying a new RdmsDataAdapter object with this constructor gen-erates a new data adapter object with an empty SelectCommand, InsertCommand, UpdateCommand, and DeleteCommand.

Page 102: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 94

RdmsDataAdapter(RdmsCommand) Constructor

Syntax:

public RdmsDataAdapter(RdmsCommand command)

Description:

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

Using this constructor is identical to the following commands:

RdmsDataAdapter da = new RdmsDataAdapter()da.SelectCommand = command;

Parameters:

command

Type: RdmsCommand

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

Page 103: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 95

RdmsDataAdapter(string, RdmsConnection) Constructor

Syntax:

public RdmsDataAdapter(string sql, RdmsConnection connection)

Description:

A constructor for the RdmsDataAdapter class. Specifying a new RdmsDataAdapter object with this constructor generates anew data adapter object with a new RdmsCommand (created from connection) as the SelectCommand and with an emptyInsertCommand, UpdateCommand, and DeleteCommand.

Using this constructor is identical to the following commands:

RdmsCommand cmd = new RdmsCommand(sql, connection);RdmsDataAdapter da = new RdmsDataAdapter()da.SelectCommand = cmd;

Parameters:

sql

Type: System.String

Specifies the SQL select command to use as the CommandText of the newly created SelectCommand.

connection

Type: RdmsConnection

Specifies connection to use for the new RdmsConnection that will be generated to produce the SelectCom-mand.

Page 104: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 96

RdmsDataAdapter(string, string) Constructor

Syntax:

public RdmsDataAdapter(string sql, string connectionString)

Description:

A constructor for the RdmsDataAdapter class. Specifying a new RdmsDataAdapter object with this constructor generates anew data adapter object with a new RdmsCommand (created from a new RdmsConnection using connectionString and withthe CommandText set to sql) as the SelectCommand and with an empty InsertCommand, UpdateCommand, and DeleteCom-mand.

Using this constructor is identical to the following commands:

RdmsConnection conn = new RdmsConnection(connectionString);RdmsCommand cmd = new RdmsCommand(sql, conn);RdmsDataAdapter da = new RdmsDataAdapter()da.SelectCommand = cmd;

Parameters:

sql

Type: System.String

Specifies the SQL select command to use as the CommandText of the newly created SelectCommand.

connectionString

Type: System.String

Specifies the string to use as the ConnectionString for the new RdmsConnection that will be generated toproduce the SelectCommand.

Page 105: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 97

RowUpdated Event

Syntax:

public event RdmsRowUpdatedEventHandler RowUpdated

Description:

Type: RdmsRowUpdatedEventHandler

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

Page 106: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 98

RowUpdating Event

Syntax:

public event RdmsRowUpdatingEventHandler RowUpdating

Description:

Type: RdmsRowUpdatingEventHandler

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

Page 107: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 99

IDbDataAdapter.DeleteCommand Property

Syntax:

IDbCommand IDbDataAdapter.DeleteCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmsCommand used to delete records from the database.

Reference:

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

Page 108: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 100

IDbDataAdapter.InsertCommand Property

Syntax:

IDbCommand IDbDataAdapter.InsertCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmsCommand used to insert records into the database.

Reference:

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

Page 109: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 101

IDbDataAdapter.SelectCommand Property

Syntax:

IDbCommand IDbDataAdapter.SelectCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmsCommand used to select records into the database.

Reference:

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

Page 110: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 102

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 111: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 103

IDbDataAdapter.UpdateCommand Property

Syntax:

IDbCommand IDbDataAdapter.UpdateCommand { get; set; }

Description:

Type: System.Data.IDbCommand

The RdmsCommand used to update records into the database.

Reference:

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

Page 112: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 104

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(DataSet)

Page 113: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 105

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(DataTable)

Page 114: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 106

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(DataSet, string)

Page 115: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 107

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(int, int, DataTable[])

Page 116: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 108

Fill(DataSet, int, int, string) Method

Syntax:

public int Fill(DataSet dataSet, int startRecord, int maxRecords, string sourceTable)

Description:

Adds or refreshes rows in the DataSet for the DataTable named sourceTable starting at record startRecord and continuingthrough 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.

Reference:

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

Page 117: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 109

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 database based onthe 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, Schem-aType)

Page 118: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 110

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, Schem-aType)

Page 119: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 111

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 basedon 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, Schem-aType)

Page 120: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 112

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: System.Data.Common.DbDataAdapter.GetFillParameters()

Page 121: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 113

Update(DataRow[]) Method

Syntax:

public int Update(DataRow[] dataRows)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deletedrow 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 NoDataSet exists to use as a source.SystemException NoDataTable exists to update.SystemException NoDataRow 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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 114

Update(DataSet) Method

Syntax:

public int Update(DataSet dataSet)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deletedrow 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(DataSet)

Page 123: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 115

Update(DataTable) Method

Syntax:

public int Update(DataTable dataTable)

Description:

Uses the associated InsertCommand, UpdateCommand or DeleteCommand properties for each inserted, updated, or deletedrow 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 NoDataSet exists to use as a source.SystemException NoDataTable exists to update.SystemException NoDataRow 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(DataTable)

Page 124: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 116

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 deletedrow 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(DataSet, string)

Page 125: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 117

DeleteCommand Property

Syntax:

public RdmsCommand DeleteCommand { get; set; }

Description:

Type: RdmsCommand

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

Reference:

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

Page 126: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 118

InsertCommand Property

Syntax:

public RdmsCommand InsertCommand { get; set; }

Description:

Type: RdmsCommand

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

Reference:

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

Page 127: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 119

SelectCommand Property

Syntax:

public RdmsCommand SelectCommand { get; set; }

Description:

Type: RdmsCommand

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

Reference:

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

Page 128: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 120

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 beexecuted 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 RDMs does not support batch processing, so setting this value to anything other than 1 willresult in an exception.

Exceptions:

Exception ConditionArgumentOutOfRangeException A value less than zero was supplied.NotSupportedException A non-negative value other than 1 was supplied.

Reference:

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

Page 129: RDMs 8.4 ADO .NET Interface Guide

RdmsDataAdapter class

ADO .NET User Guide 121

UpdateCommand Property

Syntax:

public RdmsCommand UpdateCommand { get; set; }

Description:

Type: RdmsCommand

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

Reference:

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

Page 130: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 122

RdmsDataReader Class

Description:

The RdmsDataReader class, derived from DbDataReader, encapsulates all of the information to read the result set of a SQLquery.

Public Properties:

l Commandl Depthl FieldCountl HasRowsl IsClosedl Item[int]l Item[string]l RecordsAffectedl VisibleFieldCount

Public Methods:

l Closel 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)l GetInt16(int ordinal)l GetInt32(int ordinal)l GetInt64(int ordinal)

Page 131: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 123

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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 124

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 RdmsDataReader instance is castto 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 RdmsDataReader is closed or there is no current row.

Reference:

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

Page 133: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 125

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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 126

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetBoolean

Page 135: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 127

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetByte

Page 136: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 128

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

Syntax:

public long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, intlength)

Description:

Reads up to length bytes from the column ordinal, starting at the location indicated by dataOffset, into buffer starting at buf-ferOffset. If less bytes are available in the column, only that number of bytes will be read and the return value will indicatehow 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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 129

Exceptions:

Exception ConditionArgumentNullException The specified buffer is null.ArgumentException The dataOffset is less than zeroInvalidOperationException The RdmsDataReader is closed or there is no current row.IndexOutOfRangeException The ordinal provided is outside the range of 0 through FieldCount - 1ArgumentOutOfRangeException 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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 130

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetChar

Page 139: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 131

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

Syntax:

public long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, intlength)

Description:

Reads up to length characters from the column ordinal, starting at the location indicated by dataOffset, into buffer starting atbufferOffset. If less characters are available in the column, only that number of characters will be read and the return valuewill 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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 132

Exceptions:

Exception ConditionArgumentNullException The specified buffer is null.ArgumentException The dataOffset is less than zeroInvalidOperationException The RdmsDataReader is closed or there is no current row.IndexOutOfRangeException The ordinal provided is outside the range of 0 through FieldCount - 1ArgumentOutOfRangeException 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: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 133

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 RdmsDataReader 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.GetData

Page 142: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 134

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 RdmsDataReader 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.GetDataTypeName

Page 143: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 135

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetDateTime

Page 144: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 136

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetDecimal

Page 145: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 137

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetDouble

Page 146: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 138

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 RdmsDataReader is closed.

Reference:

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

Page 147: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 139

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 RdmsDataReader 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.GetFieldType

Page 148: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 140

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 usuallymeans the column data cannot be

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

Reference:

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

Page 149: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 141

GetGuid(int) Method

Syntax:

public Guid GetGuid(int ordinal)

Description:

Get the value of the specified column as a globally-unique identifier (GUID). RDM Server does not currently support GUIDsso this method will throw an InvalidCastException.

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetGuid

Page 150: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 142

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetInt16

Page 151: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 143

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetInt32

Page 152: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 144

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetInt64

Page 153: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 145

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 RdmsDataReader is closed.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.GetName

Page 154: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 146

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 RdmsDataReader is closed.IndexOutOfRangeException The specified namewas not a valid column name

Reference:

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

Page 155: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 147

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 RdmsDataReader 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: Sys-tem.Data.Common.DbDataReader.GetProviderSpecificFieldType

Page 156: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 148

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 RdmsDataReader 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.GetProviderSpecificValue

Page 157: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 149

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 RdmsDataReader is closed or there is no current row.

Reference:

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

Page 158: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 150

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.NumericPrecision The 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.

This is method is not currently supported by RDM Server SQL.

Return Value:

Type: System.Data.DataTable

A DataTable that describes the column metadata.

Exceptions:

Exception ConditionInvalidOperationException The RdmsDataReader is closed.

Reference:

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

Page 159: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 151

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 usuallymeans the column data cannot be

converted to the requested type.InvalidOperationException The RdmsDataReader 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.GetString

Page 160: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 152

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 RdmsDataReader 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.GetValue

Page 161: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 153

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 RdmsDataReader is closed or there is no current row.

Reference:

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

Page 162: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 154

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 RdmsDataReader 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.IsDBNull

Page 163: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 155

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 RdmsDataReader is closed.

Reference:

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

Page 164: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 156

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 createdor 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 RdmsDataReader is closed.

Reference:

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

Page 165: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 157

Command Property

Syntax:

public RdmsCommand Command { get; }

Description:

Type: RdmsCommand

Gets the RdmsCommand associated with the data reader.

Page 166: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 158

Depth Property

Syntax:

public int Depth { get; }

Description:

Type: System.Int32

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

Reference:

System.Data.Common.DbDataReader.Depth

Page 167: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 159

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 168: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 160

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 169: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 161

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 170: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 162

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 RdmsDataReader 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 171: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 163

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 RdmsDataReader is closed or there is no current row.IndexOutOfRangeException The specified namewas not a valid column name

Reference:

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

Page 172: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 164

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 wereaffected 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: System.Data.Common.DbDataReader.RecordsAffected

Page 173: RDMs 8.4 ADO .NET Interface Guide

RdmsDataReader Class

ADO .NET User Guide 165

VisibleFieldCount Property

Syntax:

public int VisibleFieldCount { get; }

Description:

Type: System.Int32

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

Reference:

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

Page 174: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 166

RdmsParameter Class

Description:

The RdmsParameter class, derived from DbParameter, represents a parameter that will be used with a command.

Public Constructors:

l RdmsParameter()l RdmsParameter(string, RdmsType)l RdmsParameter(string, Object)

Public Properties:

l DbTypel Directionl IsNullablel ParameterNamel RdmsTypel Sizel SourceColumnl SourceColumnNullMappingl SourceVersionl 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 ResetRdmsType()l ToString() (Inherited from Component)

Explicit Interface Implementations:

l IDbDataParameter.Precisionl IDbDataParameter.Scale

Reference:

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

Page 175: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 167

RdmsParameter() Constructor

Syntax:

public RdmsParameter()

Description:

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

Parameters:

None

Exceptions:

None

Page 176: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 168

RdmsParameter(string, Object) Constructor

Syntax:

public RdmsParameter(string parameterName, Object value)

Description:

A constructor for the RdmsParameter class where the parameter name and value are specified. An association with an Rdm-sCommand 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 177: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 169

RdmsParameter(string, RdmsType) Constructor

Syntax:

public RdmsParameter(string parameterName, RdmsType dataType)

Description:

A constructor for the RdmsParameter class where the parameter name and default type for the parameter are specified. An asso-ciation with an RdmsCommand needs to be made before the new parameter object is useful.

Parameters:

parameterName

Type: System.String

The new parameter's name.

dataType

Type: RdmsType

The data type of the new parameter.

Exceptions:

None

Page 178: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 170

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 RdmsParameter instance is cast toan IDbDataParameter interface.

Reference:

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

Page 179: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 171

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 RdmsParameter instance is cast toan IDbDataParameter interface.

Reference:

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

Page 180: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 172

ResetDbType() Method

Syntax:

public void ResetDbType()

Description:

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

Reference:

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

Page 181: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 173

ResetRdmsType() Method

Syntax:

public void ResetRdmsType()

Description:

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

Page 182: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 174

DbType Property

Syntax:

public DbType DbType { get; set; }

Description:

Type: System.Data.DbType

Gets or sets the DbType of the parameter. The DbType and RdmsType parameters are linked. Setting either changes the otherto 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 183: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 175

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 RDMs 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 184: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 176

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 185: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 177

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: System.Data.Common.DbParameter.ParameterName

Page 186: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 178

RdmsType Property

Syntax:

public RdmsType RdmsType { get; set; }

Description:

Type: RdmsType

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

Page 187: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 179

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 sizeis 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 188: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 180

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: System.Data.Common.DbParameter.SourceColumn

Page 189: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 181

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: System.Data.Common.DbParameter.SourceColumnNullMapping

Page 190: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 182

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 Rdm-sDataAdapater.UpdateCommand during an update operation.

Exceptions:

None,

Reference:

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

Page 191: RDMs 8.4 ADO .NET Interface Guide

RdmsParameter Class

ADO .NET User Guide 183

Value Property

Syntax:

public Object Value { get; set; }

Description:

Type: System.Object

Gets or sets the value of the parameter. If the DbType or RdmsType has not already be specified, setting the Value will causethe type to be inferred. If the type has been established, setting the Value will cause the Value to be converted to the spe-cified 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 192: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 184

RdmsParameterCollection Class

Description:

The RdmsParameterCollection class, derived from DbParameterCollection, represents a collection of parameters.

Public Properties:

l Countl IsFixedSizel IsReadOnlyl IsSynchronizedl Item[int]l Item[string]l SyncRoot

Public Methods:

l Add(Object)l Add(RdmsParameter)l Add(string, RdmsType)l Add(string, Object)l AddRange(Array)l AddRange(RdmsParameter[])l Clear()l Contains(Object)l Contains(RdmsParameter)l Contains(string)l CopyTo(Array, int)l CopyTo(RdmsParameter[], 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(RdmsParameter)l IndexOf(string)l InitializeLifetimeService() (Inherited from MarshalByRefObject)l Insert(int, Object)l Insert(int, RdmsParameter)l Remove(Object)

Page 193: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 185

l Remove(RdmsParameter)l RemoveAt(int)l RemoveAt(string)l ToString() (Inherited from Component)

Explicit Interface Implementations:

l IDbDataParameterCollection.Iteml IList.Item

Reference:

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

Page 194: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 186

IDataParameterCollection.Item[string] Property

Syntax:

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

Description:

Type: System.Object

Gets or sets the RdmsParameter 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 RdmsParameterCollectioninstance is cast to an IDataParameterCollection interface.

Exceptions:

Exception ConditionArgumentException The value is not a valid RdmsParameter.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 195: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 187

IList.Item[int] Property

Syntax:

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

Description:

Type: System.Object

Gets or sets the RdmsParameter 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 RdmsParameterCollectioninstance is cast to an IList interface.

Exceptions:

Exception ConditionArgumentException The value is not a valid RdmsParameter.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 196: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 188

Add(Object) Method

Syntax:

public int Add(Object value)

Description:

Adds the specified RdmsParameter object to the collection.

Parameters:

value

Type: System.Object

The RdmsParameter to add to the collection.

Return Value:

Type: System.Int32

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

Exceptions:

Exception ConditionInvalidCastException The specified value is not an RdmsParameterArgumentException The specified parameter is already in another collectionArgumentNullException The specified value is null

Reference:

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

Page 197: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 189

Add(RdmsParameter) Method

Syntax:

public int Add(RdmsParameter value)

Description:

Adds the specified RdmsParameter object to the collection.

Parameters:

value

Type: RdmsParameter

The RdmsParameter to add to the collection

Return Value:

Type: System.Int32

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

Exceptions:

Exception ConditionArgumentException The specified parameter is already in another collectionArgumentNullException The specified value is null

Page 198: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 190

AddRange(Array) Method

Syntax:

public void AddRange(Array values)

Description:

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

Parameters:

values

Type: System.Array

The array of values for the new parameters.

Exceptions:

Exception ConditionInvalidCastException The specified value is not an RdmsParameterArgumentException The specified parameter is already in another collectionArgumentNullException The specified value is null

Reference:

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

Page 199: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 191

AddRange(RdmsParameter[]) Method

Syntax:

public void AddRange(RdmsParameter[] parameters)

Description:

Adds an array of new RdmsParameter objects to the collection.

Parameters:

parameters

Type: RdmsParameter[]

The array of new parameters to add to the collection

Exceptions:

Exception ConditionArgumentException The specified parameter is already in another collectionArgumentNullException The specified value is null

Page 200: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 192

Add(string, Object) Method

Syntax:

public int Add(string parameterName, Object value)

Description:

Adds a new RdmsParameter 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 RdmsParameter object in the collection.

Exceptions:

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

Page 201: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 193

Add(string, RdmsType) Method

Syntax:

public int Add(string parameterName, RdmsType dataType)

Description:

Adds a new RdmsParameter object to the collection with the specified ParameterName and RdmsType.

Parameters:

parameterName

Type: System.String

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

dataType

Type: RdmsType

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

Return Value:

Type: System.Int32

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

Page 202: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 194

Clear() Method

Syntax:

public void Clear()

Description:

Removes all RdmsParameter values from the collection

Reference:

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

Page 203: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 195

Contains(Object) Method

Syntax:

public bool Contains(Object value)

Description:

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

Parameters:

value

Type: System.Object

The RdmsParameter to look for in the collection.

Return Value:

Type: System.Boolean

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

Reference:

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

Page 204: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 196

Contains(RdmsParameter) Method

Syntax:

public bool Contains(RdmsParameter value)

Description:

Indicates whether an RdmsParameter is contained in the collection.

Parameters:

value

Type: RdmsParameter

The parameter to look for in the collection.

Return Value:

Type: System.Boolean

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

Page 205: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 197

Contains(string) Method

Syntax:

public bool Contains(string parameterName)

Description:

Indicates whether an RdmsParameter 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 RdmsParameter with the specified name is in the collection; otherwise False.

Reference:

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

Page 206: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 198

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: System.Data.Common.DbParameterCollection.CopyTo

Page 207: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 199

CopyTo(RdmsParameter[], int) Method

Syntax:

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

Description:

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

Parameters:

array

Type: RdmsParameter[]

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 208: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 200

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: System.Data.Common.DbParameterCollection.GetEnumerator

Page 209: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 201

IndexOf(Object) Method

Syntax:

public int IndexOf(Object value)

Description:

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

Parameters:

value

Type: System.Object

The RdmsParameter 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: System.Data.Common.DbParameterCollection.IndexOf

Page 210: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 202

IndexOf(RdmsParameter) Method

Syntax:

public int IndexOf(RdmsParameter value)

Description:

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

Parameters:

value

Type: RdmsParameter

The RdmsParameter 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 211: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 203

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: System.Data.Common.DbParameterCollection.IndexOf

Page 212: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 204

Insert(int, Object) Method

Syntax:

public void IndexOf(int index, Object value)

Description:

Inserts the specified parameter value(must be of type RdmsParameter) 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 parameter is already in another collectionArgumentNullException The specified value is nullArgumentOutOfRangeException The index specified is less than zero or greater than Count.InvalidCastException The specified value is not an RdmsParameter

Reference:

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

Page 213: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 205

Insert(int, RdmsParameter) Method

Syntax:

public void IndexOf(int index, RdmsParameter 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: RdmsParameter

The parameter to be inserted.

Exceptions:

Exception ConditionArgumentException The specified parameter is already in another collectionArgumentNullException The specified value is nullArgumentOutOfRangeException The index specified is less than zero or greater than Count.

Page 214: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 206

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 or equal to Count.

Reference:

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

Page 215: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 207

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: System.Data.Common.DbParameterCollection.RemoveAt

Page 216: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 208

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: System.Data.Common.DbParameterCollection.Remove

Page 217: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 209

Remove(RdmsParameter) Method

Syntax:

public void Remove(RdmsParameter value)

Description:

Removes the specified parameter from the parameter collection.

Parameters:

value

Type: RdmsParameter

The parameter to be removed.

Return Value:

None. No indication is given whether a parameter was removed or not.

Page 218: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 210

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: System.Data.Common.DbParameterCollection.Count

Page 219: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 211

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: System.Data.Common.DbParameterCollection.IsFixedSize

Page 220: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 212

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: System.Data.Common.DbParameterCollection.IsReadOnly

Page 221: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 213

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: System.Data.Common.DbParameterCollection.IsSynchronized

Page 222: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 214

Item[int] Property

Syntax:

public RdmsParameter this[int index] { get; set; }

Description:

Type: RdmsParameter

Gets or sets the RdmsParameter 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: System.Data.Common.DbParameterCollection.Item(Int32)

Page 223: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 215

Item[string] Property

Syntax:

public RdmsParameter this[string parameterName] { get; set; }

Description:

Type: RdmsParameter

Gets or sets the RdmsParameter 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: System.Data.Common.DbParameterCollection.Item(String)

Page 224: RDMs 8.4 ADO .NET Interface Guide

RdmsParameterCollection Class

ADO .NET User Guide 216

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: System.Data.Common.DbParameterCollection.SyncRoot

Page 225: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatedEventArgs Class

ADO .NET User Guide 217

RdmsRowUpdatedEventArgs Class

Description:

The RdmsRowUpdatedEventArgs class, derived from RowUpdatedEventArgs provides data for the RowUpdated event of theADO.NET Data Provider for RDMs.

Public Constructors:

l RdmsRowUpdatedEventArgs(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)ll Equals(Object other) (Inherited from Object)l GetHashCode() (Inherited from Object)l GetType() (Inherited from Object)l ToString() (Inherited from Component)

Page 226: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatedEventArgs Class

ADO .NET User Guide 218

RdmsRowUpdatedEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping) Con-structor

Syntax:

public RdmUpdatedEventArgs(DataRow dataRow,IDbCommand command,StatementType statementType,DataTableMapping tableMapping)

Description:

Creates a new RdmsRowUpdatedEventArgs object. This class does not need to be created by application programs. It will begenerated by the system when handling the RowUpdated event.

Parameters:

dataRow

Type: System.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 227: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatedEventArgs Class

ADO .NET User Guide 219

Command Property

Syntax:

public IDbCommand Command { get; }

Description:

Type: System.Data.IDbCommand

Gets the RdmsCommand used to when an Update method is called to modify the database.

Reference:

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

Page 228: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatingEventArgs Class

ADO .NET User Guide 220

RdmsRowUpdatingEventArgs Class

Description:

The RdmsRowUpdatingEventArgs class, derived from RowUpdatingEventArgs provides data for the RowUpdating event ofthe ADO.NET Data Provider for RDMs.

Public Constructors:

l RdmsRowUpdatingEventArgs(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 229: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatingEventArgs Class

ADO .NET User Guide 221

RdmsRowUpdatingEventArgs(DataRow, IDbCommand, StatementType, DataTableMapping) Con-structor

Syntax:

public RdmUpdatingEventArgs(DataRow dataRow,IDbCommand command,StatementType statementType,DataTableMapping tableMapping)

Description:

Creates a new RdmsRowUpdatedEventArgs object. This class does not need to be created by application programs. It will begenerated by the system when handling the RowUpdating event.

Parameters:

dataRow

Type: System.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 230: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatingEventArgs Class

ADO .NET User Guide 222

Command Property

Syntax:

public IDbCommand Command { get; set; }

Description:

Type: System.Data.IDbCommand

Gets the RdmsCommand used to when an Update method is called to modify the database.

Reference:

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

Page 231: RDMs 8.4 ADO .NET Interface Guide

RdmsTransaction Class

ADO .NET User Guide 223

RdmsTransaction Class

Description:

The RdmsTransaction class, derived from DbTransaction, represents a transaction, encapsulating multiple changes into asingle action.

Public Properties:

l Connectionl 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 232: RDMs 8.4 ADO .NET Interface Guide

RdmsTransaction Class

ADO .NET User Guide 224

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 233: RDMs 8.4 ADO .NET Interface Guide

RdmsTransaction Class

ADO .NET User Guide 225

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 234: RDMs 8.4 ADO .NET Interface Guide

RdmsTransaction Class

ADO .NET User Guide 226

Connection Property

Syntax:

public RdmsConnection Connection { get; }

Description:

Type: RdmsConnection

Gets the connection that the current transaction is associated with.

Reference:

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

Page 235: RDMs 8.4 ADO .NET Interface Guide

RdmsTransaction Class

ADO .NET User Guide 227

IsolationLevel Property

Syntax:

public IsolationLevel IsolationLevel{ get; }

Description:

Type: System.Data.IsolationLevel

Gets the isolation level that this transaction is using. The RDMs Data Adapter directly supports the Isol-ationLevel.Serializable isolation level. All other isolation levels will be silently mapped to IsolationLevel.Serializable.

Exceptions:

None

Reference:

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

Page 236: RDMs 8.4 ADO .NET Interface Guide

RdmException Class

ADO .NET User Guide 228

RdmException Class

Description:

The RdmException class, derived from DbException, represents an error returned from the RDMs 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 Procedurel Source (Inherited from Exception)l SqlStatel 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 237: RDMs 8.4 ADO .NET Interface Guide

RdmException Class

ADO .NET User Guide 229

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 238: RDMs 8.4 ADO .NET Interface Guide

RdmException Class

ADO .NET User Guide 230

SqlState Property

Syntax:

public string SqlState{ get; }

Description:

Type: System.String

Returns the SQL state associated with the error encountered.

Exceptions:

None

Page 239: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatedEventHandler Delegate

ADO .NET User Guide 231

RdmsRowUpdatedEventHandler Delegate

Syntax:

public delegate void RdmsRowUpdatedEventHandler(Object sender, RdmsRowUpdatedEventArgs event)

Description:

The RdmsRowUpdatedEventHandler delegate represents the method that will handle the RowUpdated event of an Rdm-sDataAdapter. This handler is not required to perform any action and it should avoid generating exceptions or allowing excep-tions to propagate to the calling method, as any exceptions that do reach the caller are ignored.

Parameters:

sender

Type: System.Object

The source of the event.

event

Type: RdmsRowUpdatedEventArgs

The RdmsRowUpdatedEventArgs that contains the event data

Page 240: RDMs 8.4 ADO .NET Interface Guide

RdmsRowUpdatingEventHandler Delegate

ADO .NET User Guide 232

RdmsRowUpdatingEventHandler Delegate

Syntax:

public delegate void RdmsRowUpdatingEventHandler(Object sender, RdmsRowUpdatingEventArgsevent)

Description:

The RdmsRowUpdatingEventHandler delegate represents the method that will handle the RowUpdating event of an Rdm-sDataAdapter. This handler is not required to perform any action and it should avoid generating exceptions or allowing excep-tions to propagate to the calling method, as any exceptions that do reach the caller are ignored.

Parameters:

sender

Type: System.Object

The source of the event.

event

Type: RdmsRowUpdatingEventArgs

The RdmsRowUpdatingEventArgs that contains the event data

Page 241: RDMs 8.4 ADO .NET Interface Guide

RdmsType Enumeration

ADO .NET User Guide 233

RdmsType Enumeration

Description:

The RdmsType enumeration is used to indicate the data types that the SQL engine supports. The following data types areincluded.

Type name DescriptionRowid A row identifierAnsiString 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 pointDecimal A fixed point numeric valueDate A dateTime A timeTimestamp A date and time (with fractions of a second)Blob A binary large objectClob A character large object