Mimer SQL Data Provider help
MimerUserDefinedType Constructor(Object[])
Example 




Mimer.Data.Client Namespace > MimerUserDefinedType Class > MimerUserDefinedType Constructor : MimerUserDefinedType Constructor(Object[])
An object array with the data to store in this instance.
Create and populate a user defined type with data.
Syntax
'Declaration
 
Public Function New( _
   ByVal data() As Object _
)
public MimerUserDefinedType( 
   object[] data
)
public MimerUserDefinedType( 
    data: TObjectarray of
); 
public function MimerUserDefinedType( 
   data : Object[]
);
public: MimerUserDefinedType( 
   Object*[]* data
)

Parameters

data
An object array with the data to store in this instance.
Remarks
The length of the data array must match the number of attributes in the user-defined type. This is not checked until the data is sent to the server with, for example, ExecuteNonQuery. In addition each data type must be compatible with the data type of the corresponding element of the user defined type.
Example
Assume we have two user defined types:

create type address as (street varchar(30), streetnumber integer);

create type person as (firstname varchar(20), lastname varchar(20), home address);

// 
//  Create an instance that can be used with the address user defined type
// 
MimerUserDefinedType myaddr = new MimerUserDefinedType(new object[] {"memory lane", 34});
MimerParameter par2 = new MimerParameter();
par2.Value = myaddr;
// 
//  Create an instance that can be used with the person user defined type. In this
//  case there is a nested instance of the address user defined type
// 
MimerUserDefinedType vip = new MimerUserDefinedType(new object[] 
{
    "Gregory", 
    "Sandham", 
    new MimerUserDefinedType(new object[] {"memory lane", 34})
});
MimerParameter par2 = new MimerParameter();
par2.Value = vip;
Requirements

.NET Framework
Version 2.0 or later

See Also

Reference

MimerUserDefinedType Class
MimerUserDefinedType Members
Overload List