<div class="meta" robots="noindex">

</div>

Method

# ODBCDatabase.GetSQLTypeInfo

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `ODBCDatabase.DataTypeInfo<odbcdatabase.datatypeinfo>` as a replacement.

</div>

## Description

Returns a `RowSet</api/databases/rowset>` containing information about data types supported by the data source.

## Notes

The *DataType* specifies the type for which the information should be returned.

Use `ODBCConstant</api/databases/odbcconstant>` values for the data types.

To return a `RowSet</api/databases/rowset>` containing all defined types, specify `ODBCConstant</api/databases/odbcconstant>`.SQL_ALL_TYPES.

The returned RecordSet typically contains these columns, but they could vary depending on the driver being used: \* Data Type Name \* Data Type integer value \* Column size

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

### References

[SQLGetTypeInfo ODBC function](http://msdn.microsoft.com/en-us/library/windows/desktop/ms714632(v=vs.85).aspx)

## Sample code

Displays all the supported data types for the current ODBC connection in a ListBox:

``` xojo
Var db As New ODBCDatabase

db.DataSource = "TeamExample"

Try
  db.Connect

  Var rs As RowSet
  rs = db.GetSQLTypeInfo(ODBCConstant.SQL_ALL_TYPES)

  While Not rs.AfterLastRow
    ListBox1.AddRow(rs.ColumnAt(1).StringValue)
    rs.MoveNext
  Wend

Catch error As DatabaseException
  MessageBox("Error: " + error.Message)
End Try
```

## Compatibility

All project types on all supported operating systems.
