Guides
General Concepts
<div class="nostroke_table"></div>  
|   |   |
|:--|:--------|
| **Handle name** |[Descriptor](https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/descriptor-handles?view=sql-server-ver16)
| **Type name** | `SQL_HANDLE_DESC`
|   |   |
|:--|:--------|
| **Description** |Describes the attributes of a data structure or parameter, and allows the application to specify the structure of data to be bound/retrieved.
| **Use case** | Describing table structures, result sets, binding columns to application buffers
| **Additional information** | Used in situations where data structures need to be explicitly defined, for example during parameter binding or result set fetching. They are automatically allocated when a statement is allocated, but can also be allocated explicitly.  
#### Connecting {#docs:guides:odbc:general::connecting}  
The first step is to connect to the data source so that the application can perform database operations.  First the application must allocate an environment handle, and then a connection handle.  The connection handle is then used to connect to the data source.  There are two functions which can be used to connect to a data source, [`SQLDriverConnect`](https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function?view=sql-server-ver16) and [`SQLConnect`](https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlconnect-function?view=sql-server-ver16).  The former is used to connect to a data source using a connection string, while the latter is used to connect to a data source using a DSN.