Posts
1150
Comments
891
Trackbacks
1
Using Typed Datasets with Microsoft's Enterprise Library

From: http://aspalliance.com/688

Title: Strongly Typed DataSet (to Rosie)   
Name: sloan
Date: 9/7/2005 6:33:54 PM
Comment:
Public Function TitlesDSGet() as MyStronglyTypedDS

dim returnDS as MyStronglyTypedDS = new MyStronglyTypedDS

Dim db As Database = DatabaseFactory.CreateDatabase()

Dim dbCommandWrapper As dbCommandWrapper = db.GetStoredProcCommandWrapper("dbo.uspTitlesGetAll")


db.LoadDataSet(dbCommandWrapper, returnDS, New String() {"Titles", "Publishers"})


Return returnDS

naturally, this example has the strongly typed dataset having 2 tables "Titles" and "Publishers", and the usp will return 2 result sets.

I have only tried that code on Sql Server 2000, fyi.

posted on Wednesday, August 01, 2007 2:33 PM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 5 and 5 and type the answer here: