ODBC Samples
The samples in this section demonstrate how to use ODBC to retrieve data.
In This Section
- Readme_Stored Procedure Using ODBC CALL Syntax (OLE DB)
Demonstrates processing a rowset, a return code, and an output parameter.
- Readme_Processing Return Codes and Output Parameters (ODBC)
Shows processing a return code and output parameter.
- Readme_Profiling Driver Performance Data (ODBC)
Shows the SQL Server ODBC driver-specific options to record performance statistics. The sample creates one file: odbcperf.log.
- Readme_Logging Long-Running Queries (ODBC)
Shows the SQL Server ODBC driver-specific options to log long-running queries. When run, creates Odbcqry.log, which contains a list of queries whose execution exceeds an interval set by the application.
- Readme_How to process ODBC errors (ODBC)
Shows a simple error handler that calls SQLGetDiagRec for the standard ODBC information. It then tests for a valid connection, and if there is, it calls SQLGetDiagField for the SQL Server ODBC driver-specific diagnostic fields.
- Readme_How to bulk copy without a format file (ODBC)
Shows how to bulk code without a format file.
- Readme_How to bulk copy a SELECT result set (ODBC)
Shows how to bulk copy and write the result set of a SELECT statement.
- Readme_How to create a bulk copy format file (ODBC)
Shows how to create a bulk copy format file.
- Readme_How to bulk copy data from program variables (ODBC)
Shows how to do a bulk copy from program variables bound with bcp_bind. Data is sent with bcp_sendrow.
- Readme_Mirroring Failover (ODBC)
Shows how database mirroring works.
- Readme_Table-Valued Parameters (ODBC)
Shows how to use table-valued parameters in ODBC.
- Readme_Send and Receive Data Incrementally with FILESTREAM (ODBC)
Shows how to use the FILESTREAM feature to send and receive data incrementally with SQLPutData and SQLGetData.
- Readme_Integrated Kerberos Authentication (ODBC)
Shows how to get mutual Kerberos authenication using ODBC in SQL Server Native Client.
- Readme_ODBC Date Time
Shows how to initialize the date/time data structures that were added in SQL Server 2008. The sample then prepares the input values, binds parameters, and executes the query.
- Readme_UseDataAtExecutionParameters (ODBC)
Shows how to read a SQL_LONG variable character data using SQLGetData.
- Readme_UseDataAtExecutionColumns (ODBC)
Shows how to read a SQL_LONG variable character data using SQLGetData.
- Readme_BulkCopyFormatAndData (ODBC)
Shows how to use the ODBC bcp_init function with a format file.
- Readme_ODBC_SparseCols
This sample shows how to call SQLColumns on a table with sparse columns defined.
- Readme_Spatial_Storage
This sample shows how to insert two rows into a table with a geography column from a WellKnownBinary (WKB) using 2 different bindings, and then selects one row from that table and uses ::STAsText() to display it.
- Readme_Large_UDT_ODBC
Shows how to access data from a CLR user-defined type.
See Also
Concepts
Other Resources
SQL Server 2008 Native Client (ODBC)