03.01.2015 Views

C# 5.0 Programmer's Reference

Visual Studio 2013 C# 5.0 Programmer's Reference

Visual Studio 2013 C# 5.0 Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using Bound Controls ❘ 519<br />

b. In the General section at the bottom of the Toolbox, right-click and select<br />

Choose Items.<br />

c. On the .NET Framework Components tab, select DataGrid (System.Windows.Forms)<br />

and OleDbDataAdapter. Then click OK to add those components to the Toolbox.<br />

3. Create a data adapter for the Students table.<br />

a. Double-click the OleDbDataAdapter tool in the Toolbox to start the Data Adapter<br />

Configuration Wizard shown in Figure 23-9. Select the connection you created earlier<br />

and click Next.<br />

Figure 23-9: Select or create the database connection that<br />

you want to use.<br />

Abandoned Adapters<br />

When you double-click the OleDbDataAdapter tool in the Toolbox, Visual Studio<br />

adds the adapter to the form. It then launches the Data Adapter Configuration<br />

Wizard to let you configure the adapter.<br />

If you cancel the wizard, the adapter is still on the form. In that case, you may want<br />

to remove it.<br />

b. On the wizard’s next page, shown in Figure 23-10, select Use SQL Statements and<br />

click Next.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!