Package com.microsoft.sqlserver.jdbc

## Class SQLServerDataTable

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.SQLServerDataTable

    public final class SQLServerDataTable
    extends Object

### Constructor Summary

Constructors
`SQLServerDataTable()` The constant in the Java programming language, sometimes referred to as a type code, that identifies the type TVP.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addColumnMetadata​(SQLServerDataColumn column)` Adds meta data for the specified column
`void` `addColumnMetadata​(String columnName, int sqlType)` Adds meta data for the specified column
`void` `addRow​(Object... values)` Adds one row of data to the data table.
`void` `clear()` Clears this data table.
`Map<Integer,SQLServerDataColumn>` `getColumnMetadata()` Retrieves `java.util.Map` object type of columnMetaData for all columns where column indexes are mapped with their respective `SQLServerDataColumn` Java object
`Iterator<Map.Entry<Integer,Object[]>>` `getIterator()` Retrieves an iterator on the rows of the data table.
`String` `getTvpName()` Returns name of TVP type set by `setTvpName(String)`
`void` `setTvpName​(String tvpName)` Sets the TVP Name

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SQLServerDataTable

    public SQLServerDataTable()
                       throws SQLServerException

The constant in the Java programming language, sometimes referred to as a type code, that identifies the type TVP.

Throws:
  `SQLServerException` - when an error occurs

### Method Detail

#### clear

    public void clear()

Clears this data table.

#### getIterator

    public Iterator<Map.Entry<Integer,Object[]>> getIterator()

Retrieves an iterator on the rows of the data table.

Returns:
  an iterator on the rows of the data table.

#### addColumnMetadata

    public void addColumnMetadata​(String columnName,
                                  int sqlType)
                           throws SQLServerException

Adds meta data for the specified column

Parameters:
  `columnName` - the name of the column
  `sqlType` - the sql type of the column
Throws:
  `SQLServerException` - when an error occurs

#### addColumnMetadata

    public void addColumnMetadata​(SQLServerDataColumn column)
                           throws SQLServerException

Adds meta data for the specified column

Parameters:
  `column` - the name of the column
Throws:
  `SQLServerException` - when an error occurs

#### addRow

    public void addRow​(Object... values)
                throws SQLServerException

Adds one row of data to the data table.

Parameters:
  `values` - values to be added in one row of data to the data table.
Throws:
  `SQLServerException` - when an error occurs

#### getColumnMetadata

    public Map<Integer,SQLServerDataColumn> getColumnMetadata()

Retrieves `java.util.Map` object type of columnMetaData for all columns where column indexes are mapped with their respective `SQLServerDataColumn` Java object

Returns:
  Map

#### getTvpName

    public String getTvpName()

Returns name of TVP type set by `setTvpName(String)`

Returns:
  tvpName

#### setTvpName

    public void setTvpName​(String tvpName)

Sets the TVP Name

Parameters:
  `tvpName` - the name of TVP