Includes SQL Server 2005 Express Edition |
|
SQL Server 2005 Express Edition is a lightweight database you can use with your Visual Basic application. It is available as an optional component which can be installed during the Visual Basic setup. Similar to Microsoft Access, you can create and deploy databases as stand-alone files, but with the powerful features unique to SQL Server 2005. This gives you incredible database power and management capabilities for building your Windows application. For more information on SQL Server 2005 Express Edition, visit the SQL Server 2005 Express overview page.
Adding a database to your application is as easy as right-clicking on your project and selecting Add New Item… from the context menu.

view larger >
|
Visually design your database |
|

view larger >
|
Visual C# Express includes built-in tools that make it easy design SQL Server 2005 Express Edition databases. Using the Database Explorer pane, you can add or update tables, views, functions, stored procedures, and more. You can also visually design the structure of your database tables with a simple, easy-to-use interface.
|
|
Visual C# Express also includes the ability to create custom database diagrams to create and visualize your database relationships. This makes it easier to document your applications for maintainability or sharing with others.
|
Query Designer |
|

view larger >
|
Creating database queries can be challenging for new developers. Not only do you need to understand the SQL query language, you also need to remember the table and column names, data types, and special operators for filtering and sorting the results.
The Query Designer makes it easy to visually design your database queries. You can select the specific columns, and then apply filtering and sorting through an easy-to-use, drag-and-drop interface. You can actually watch the query being generated based on your decisions, and then easily preview the resulting data.
|
Data Source Configuration Wizard |
|

view larger >
|
The Data Source Configuration Wizard provides step-by-step assistance in connecting to different data stores, including databases (such as SQL Server and Access) or objects. You can even connect to Web services, such as MapPoint for driving directions or Amazon for information on books or DVDs.
|
|
For database data, the wizard dynamically pulls the tables and field names, enabling you to select which fields you want to display.

view larger >
|
Data Sources Window |
|

view larger >
|
After completing the Data Source Configuration Wizard, you can use the Data Sources Window to drag and drop data onto your Windows form to automatically create databound forms. This diagram shows the result of dragging and dropping a DataGridView control onto a Windows form.
|
DataGridView |
|

view larger >
|
The DataGridView control is designed for dynamically displaying data in a tabular format. Powerful features can be performed without writing a single line of code:
Display a set of database records.
Sort a set of database records.
Editing a set of database records.
|
|
You can easily include custom column types such as the ImageColumn, CheckBoxColumn, ComboBoxColumn. Additionally, you can even freeze columns, like Microsoft Excels Freeze Panes feature, so that data is visible as the user scrolls horizontally.
|
Details View |
 |
You can also configure the Data Sources Window to display your data using a Details View by clicking on the drop-down next to the data source.
|
|
|
The Details View displays your data vertically, with each data field containing its own controlincluding controls, such as Label, TextBox, ComboBox, DateTimePicker, PictureBox, or even your own custom control.
Dragging and dropping the Details View on your form will automatically add the controls and corresponding labels as shown in the following diagram.
|
BindingNavigator |
 |
Both the DataGridView and Details View automatically add a customizable BindingNavigator control which acts like a VCR-type interface. This enables you to add or delete records, move next and previous, and move to a specific record by typing the record number in the CurrentPosition text box.
|
Connect-the-dots databinding |
 |
You can also use the Data Sources Window for Connect-the-dots data binding. This enables you to take a data source from the Data Sources Window and just drag it onto a data-enabled Windows Form control, such as the ComboBox. The ComboBox will automatically be configured to pull data dynamically, as shown in the following diagram. Its that easy!
|