Add(String,MySqlType,Int32,Int32,Int32) Method
Adds a
MySqlLoaderColumn to the
MySqlLoaderColumnCollection given the column name, column data type, column size, precision, and scale.
Parameters
- name
- The name of the column.
- dbType
- One of the MySqlType values.
- size
- Maximum size of the column data (for strings only).
- precision
- The precision of the column.
- scale
- The scale of the column.
Return Value
The new column's ordinal.
The following example creates a
MySqlLoaderColumnCollection, adds an instance of
MySqlLoaderColumn to the collection, and returns a reference to the new
MySqlLoaderColumn.
|
|---|
public void CreateMyLoaderColumnColl(MySqlLoader myLoader)
{
MySqlLoaderColumnCollection myColumnCollection = myLoader.Columns;
myColumnCollection.Add("DeptNo", MySqlType.Int);
myColumnCollection.Add("DName", MySqlType.VarChar);
myColumnCollection.Add("Loc", MySqlType.VarChar);
} |
|
|---|
Public Sub CreateMyLoaderColumnColl(myLoader As MySqlLoader)
Dim myColumnCollection As MySqlLoaderColumnCollection = myLoader.Columns
myColumnCollection.Add("DeptNo", MySqlType.Int)
myColumnCollection.Add("DName", MySqlType.VarChar)
myColumnCollection.Add("Loc", MySqlType.VarChar)
End Sub |