Add(String,PgSqlType,Int32,Int32,Int32) Method
Adds a
PgSqlLoaderColumn to the
PgSqlLoaderColumnCollection given the column name, column data type, column size, precision, and scale.
Parameters
- name
- The name of the column.
- dbType
- One of the PgSqlType values.
- size
- Maximum size of the column data (only for strings).
- precision
- The precision of the column.
- scale
- The scale of the column.
Return Value
The new column's ordinal.
The following example creates a
PgSqlLoaderColumnCollection, adds an instance of
PgSqlLoaderColumn to the collection, and returns a reference to the new
PgSqlLoaderColumn.
public void CreatePgLoaderColumnColl(PgSqlLoader myLoader)
{
PgSqlLoaderColumnCollection myColumnCollection = myLoader.Columns;
myColumnCollection.Add("DeptNo", PgSqlType.Int);
myColumnCollection.Add("DName", PgSqlType.VarChar);
myColumnCollection.Add("Loc", PgSqlType.VarChar);
}
Public Sub CreatePgLoaderColumnColl(myLoader As PgSqlLoader)
Dim myColumnCollection As PgSqlLoaderColumnCollection = myLoader.Columns
myColumnCollection.Add("DeptNo", PgSqlType.Int)
myColumnCollection.Add("DName", PgSqlType.VarChar)
myColumnCollection.Add("Loc", PgSqlType.VarChar)
End Sub 'CreatePgSqlLoaderColumnColl
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2