Export (0) Print
Expand All
Expand Minimize

Data Access Samples

SQL Server 2005

The data access samples demonstrate how to use various features of SQL Server 2005 when retrieving data.

To be able to view or work with these samples, make sure they have been installed. For more information, see Installing Samples.

Name Description

Readme_MARS

Demonstrates how to use the Multiple Active Result Set (MARS) feature.

Large Binary Object (LOB) Handling by Using ADO.NET

Demonstrates how to retrieve binary data stored in the database and write the contents to a file.

README Execute stored procedure (using ODBC CALL syntax) and process return codes and output parameters (OLE DB)

Demonstrates processing a rowset, a return code, and an output parameter.

README Execute stored procedure (using RPC syntax) and process return codes and output parameters (OLE DB)

Demonstrates processing a rowset, a return code, and an output parameter.

README Execute user-defined function and process return code (OLE DB)

Executes a user-defined function and prints a return code.

README How to fetch rows from a result set (OLE DB)

Shows how to fetch rows from a result set.

README How to set large data (OLE DB)

Shows how to set BLOB data, create a table, add a sample record, fetches that record in the rowset, and then set the value of the BLOB field.

README How to enumerate OLE DB data sources (OLE DB)

Shows how to use the enumerator object to list the data sources available.

README How to bulk copy data using IRowsetFastLoad (OLE DB)

Illustrates the use of IRowsetFastLoad for bulk copying of the records into a table.

README How to obtain FAST_FORWARD cursor

Shows how to set the rowset properties to obtain a FAST_FORWARD cursor. After the properties are set, a SELECT statement is executed to retrieve and display the Name column of the Purchasing.Vendor table in the AdventureWorks database.

README How to retrieve rows using bookmarks (OLE DB)

Shows how to fetch rows using a bookmark.

README Fetching Columns Using IRow::GetColumns (or IRow::Open) and ISequentialStream

Shows how to fetch a single row using IRow.

README Fetching Columns Using IRow::GetColumns (OLE DB)

Shows how to fetch a single row using IRow.

README How to process return codes and output parameters (ODBC)

Shows processing a return code and output parameter.

README How to profile driver performance data (ODBC)

Shows the SQL Server ODBC driver-specific options to record performance statistics. The sample creates one file: odbcperf.log.

README How to log 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 Microsoft® 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 bulk copy data from program variables (ODBC)

This sample shows how to do a bulk copy from program variables bound with bcp_bind; data sent with bcp_sendrow.

README How to create a bulk copy format file (ODBC)

Shows how to create a bulk copy format file.

README BulkCopyFormatAndData

Shows how to use the ODBC bcp_init function with a format file.

README UseDataAtExecutionColumns

Shows how to read a SQL_LONG variable character data using SQLGetData.

README UseDataAtExecutionParameters

Shows how to read a SQL_LONG variable character data using SQLGetData.

README Mirroring Failover (ODBC)

Shows how database mirroring works.

ms160934.note(en-US,SQL.90).gifImportant:
These samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples.

Community Additions

ADD
Show:
© 2014 Microsoft