Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 2.88 KB

managing-text-and-image-columns.md

File metadata and controls

39 lines (30 loc) · 2.88 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Managing Text and Image Columns
Managing Text and Image Columns
markingmyname
maghan
03/14/2017
sql
native-client
reference
text columns [ODBC]
SQL Server Native Client ODBC driver, image columns
SQL Server Native Client ODBC driver, text columns
data types [ODBC], text
columns [ODBC]
ODBC data types, image columns
data types [ODBC], mapping
ODBC data types, text columns
image columns [ODBC]

Managing Text and Image Columns

[!INCLUDESQL Server Azure SQL Database Synapse Analytics PDW]

[!INCLUDEssNoVersion] text, ntext, and image data (also referred to as long data) are character or binary string data types that can hold data values too large to fit into char, varchar, binary, or varbinary columns. The [!INCLUDEssNoVersion] text data type maps to the ODBC SQL_LONGVARCHAR data type; ntext maps to SQL_WLONGVARCHAR; and image maps to SQL_LONGVARBINARY. Some data items, such as long documents or large bitmaps, may be too large to store reasonably in memory. To retrieve long data from [!INCLUDEssNoVersion] in sequential parts, the [!INCLUDEssNoVersion] Native Client ODBC driver enables an application to call SQLGetData. To send long data in sequential parts, the application can call SQLPutData. Parameters for which data is sent at execution time are known as data-at-execution parameters.

An application can actually write or retrieve any type of data (not just long data) with SQLPutData or SQLGetData, although only character and binary data can be sent or retrieved in parts. However, if the data is small enough to fit in a single buffer, there is generally no reason to use SQLPutData or SQLGetData. It is much easier to bind the single buffer to the parameter or column.

In This Section

See Also

SQL Server Native Client (ODBC)