Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

13. Working with Stored Procedures When ... > Defining Insert, Update, and Delete ...

Defining Insert, Update, and Delete Stored Procedures Directly in the Model

Earlier in this chapter, you defined a T-SQL query directly in the SSDL by using the <CommandText> element of <Function>. That example was for a read stored procedure.

You can do the same for insert, update, and delete procedures, as well. And as with the other functions, how you call these functions depends on the return type.

What Do the Functions Look Like?

You already have worked with functions for database stored procedures in previous chapters. For example, the InsertPayment stored procedure is wrapped by the InsertPayment function in the model.

Warning

If you want to try out this function on your own, place it in the extra model you created to test out QueryView rather than in the BreakAway model.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint