Professional Documents
Culture Documents
Stored
Stored
Procedure
Procedure
Web Form
Client Database
Web
WebServer
Server SQL
SQLServer
Server
Why Use Stored Procedures?
• Modular programming
• Distribution of work
• Database security
• Faster execution
• Provides flexibility
Lesson: Calling Stored Procedures
• Calling Stored Procedures
daCategory.Fill(ds, "Categories")
daCategory.Fill(ds, "Categories");
Parameters in Stored Procedures
• Identify the available parameters
Input
Output
InputOutput
ReturnValue
or
• Include parameter values in the command string
Passing Input Parameters
iTotal = da.Parameters("@ItemCount").Value
iTotal = da.Parameters("@ItemCount").Value;
Demonstration: Passing Parameters
Lesson: Data Access with LINQ to SQL
• What Is Language Integrated Query (LINQ)?
• Querying a Database
LINQ Implementations
• LINQ to SQL
• LINQ to XML
• LINQ to DataSet
Creating a LINQ to SQL Object Model
Object Relational Designer (O/R Designer)
• Provides a visual design surface
• Immediate
Calling a Stored Procedure
• Create an instance of the DataContext class
Logon information
Virtual machine 2310C_09
User name Student
Password Pa$$w0rd
Logon Page
Login.aspx
Benefits
Coho Home Page Page Header ASPState
Winery Default.aspx Header.ascx
Menu
Registration Component
Register.aspx Class1.vb or Class1.cs Web.
tempdb
config
XML
Doctors Dentists
Files
Lab Review
Module Review and Takeaways
Review Questions
• What are the three steps in calling a stored procedure?