Compartir a través de


getObject Method (java.lang.String, java.util.Map) (SQLServerResultSet)

Gets the value of the designated column name in the current row of this SQLServerResultSet object as an object in the Java programming language, using the given Map object.

Nota

This method is not currently supported by the Microsoft SQL Server JDBC Driver. Using this method will always return the default mapping.

public java.lang.Object getObject(java.lang.String colName,
                                  java.util.Map map)

Parámetros

colName

A String that contains the column name.

map

A Map object.

Valor devuelto

An Object value.

Excepciones

SQLServerException

Observaciones

This getObject method is specified by the getObject method in the java.sql.ResultSet interface.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the SQL type of the column, following the mapping for built-in types that is specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

This method can also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of the getObject method is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Vea también

Referencia

SQLServerResultSet Class

Conceptos

getObject Method (SQLServerResultSet)
SQLServerResultSet Methods
SQLServerResultSet Members