Visual Basic Data Samples

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

These samples demonstrate various data scenarios.

To access samples from Visual Studio

  1. On the Help menu, click Samples.

  2. In the Samples on Disk section of the readme file, click local Samples folder. By default, the samples are installed in drive:\Program Files\Microsoft Visual Studio 11\Samples\1033 or drive:\Program Files (x86)\Microsoft Visual Studio 11\Samples\1033.

  3. Right-click the .zip file that contains the samples you want to open and then click Extract All to extract the samples to a folder of your choice.

For the most current samples, go to the Visual Basic Samples Web site.

Security noteSecurity Note

Microsoft provides the included samples "AS IS" with no warranties. The code in the samples is provided just to illustrate concepts. The provided code may not meet security requirements for any specific environment. We recommend that you add security and error-handling code to your projects to make them as secure and robust as you deem appropriate.

Samples

Sample

Description

Create Database Sample

Shows how to execute SQL statements from code to create a database, a table, a stored procedure, and a view.

Custom Data Controls Sample

Demonstrates how to use your own controls with the Data Source window.

ComboBox Databinding Sample

Shows how to bind data to ComboBox and DataGridView controls.

Data Search Sample

Demonstrates how to display a subset of data from within your database.

Data Validation Sample

Demonstrates the Dataset Designer and uses the PropertyChanged events to validate user input.

Entity Framework Sample

Demonstrates how the ADO.NET Entity Framework can be used in some common design patterns that promote testability and maintainability of code.

Local Data Sample

Demonstrates the local data features of Visual Studio, including the Data Sources window, TableAdapters, and the BindingSource component. Also shows how to create data-bound forms without having to write code and how to connect to a database file.

Object Binding Sample

Demonstrates how you can bind controls to objects other than database components.

Occasionally Connected Data Sample

Demonstrates how to use Microsoft Synchronization Services for ADO.NET for two-tier download-only synchronization.

Serialization Sample

Demonstrates how to serialize and deserialize an object.

Stored Procedure Sample

Demonstrates how to programmatically create and use stored procedures with ADO.NET and Microsoft SQL Server.

WCF Data Services Sample

Shows a simple ADO.NET data service that exposes data through the ADO.NET Entity Framework, and shows a WPF application that consumes the data service.

XMLDocument Class Sample

Shows how to use the XmlDocument class, which exposes the XML Document Object Model, or DOM, to manipulate XML data.

See Also

Reference

System.Data

XmlDocument

Concepts

Creating Data Applications

Other Resources

Visual Studio 2010 Samples

Visual Basic Sample Applications

XML in Visual Basic