13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 12: ADO.<strong>NET</strong>: Hello Database 305Note: The SupID fieldis not selected. It is nowautomatic, so no insertvalue is required.SQL <strong>com</strong>mandsfor inserting dataFigure 12-13 Selecting Fields for SQL Commands6. Right-click anywhere on the window to open the context menu. Select Execute SQL.When you do so, the new data are added to the Supporters table as shown in Figure 12-14.You can see where the automatic numbering provided a value for the SupID column. Itjumps from 15103 to 15107. That occurs because earlier records had been deleted.This exercise shows you how the SQL statement looks for inserting data. In thefollowing section you will see how to place that SQL <strong>com</strong>mand into a string and use itwith C#.

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

Saved successfully!

Ooh no, something went wrong!