Click here to Skip to main content
15,913,610 members
Home / Discussions / Database
   

Database

 
GeneralRe: Change Query Type To Check Query Before Executing Pin
Kyudos29-Sep-10 16:35
Kyudos29-Sep-10 16:35 
GeneralLog the Ad-Hoc statements Pin
David Mujica30-Sep-10 5:41
David Mujica30-Sep-10 5:41 
GeneralRe: Log the Ad-Hoc statements [modified] Pin
Eddy Vluggen30-Sep-10 6:37
professionalEddy Vluggen30-Sep-10 6:37 
GeneralRe: Log the Ad-Hoc statements Pin
Kyudos30-Sep-10 9:59
Kyudos30-Sep-10 9:59 
QuestionHow to find SQL Server name? Pin
AmbiguousName29-Sep-10 4:13
AmbiguousName29-Sep-10 4:13 
AnswerRe: How to find SQL Server name? Pin
Karthik. A29-Sep-10 4:36
Karthik. A29-Sep-10 4:36 
GeneralRe: How to find SQL Server name? Pin
AmbiguousName29-Sep-10 5:06
AmbiguousName29-Sep-10 5:06 
GeneralRe: How to find SQL Server name? Pin
Karthik. A29-Sep-10 7:41
Karthik. A29-Sep-10 7:41 
GeneralRe: How to find SQL Server name? Pin
Mycroft Holmes29-Sep-10 15:55
professionalMycroft Holmes29-Sep-10 15:55 
QuestionUnLock Stored Procedures Pin
jojoba201129-Sep-10 3:01
jojoba201129-Sep-10 3:01 
AnswerRe: UnLock Stored Procedures Pin
Mycroft Holmes29-Sep-10 12:11
professionalMycroft Holmes29-Sep-10 12:11 
QuestionData Binding, Combo Boxes, and Related tables. Pin
patzerFish28-Sep-10 14:10
patzerFish28-Sep-10 14:10 
AnswerRe: Data Binding, Combo Boxes, and Related tables. PinPopular
Mycroft Holmes28-Sep-10 14:40
professionalMycroft Holmes28-Sep-10 14:40 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
PIEBALDconsult28-Sep-10 14:54
mvePIEBALDconsult28-Sep-10 14:54 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Mycroft Holmes28-Sep-10 15:15
professionalMycroft Holmes28-Sep-10 15:15 
AnswerRe: Data Binding, Combo Boxes, and Related tables. Pin
Luc Pattyn28-Sep-10 15:34
sitebuilderLuc Pattyn28-Sep-10 15:34 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Mycroft Holmes28-Sep-10 15:43
professionalMycroft Holmes28-Sep-10 15:43 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Luc Pattyn28-Sep-10 15:54
sitebuilderLuc Pattyn28-Sep-10 15:54 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Roger Wright29-Sep-10 3:13
professionalRoger Wright29-Sep-10 3:13 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Mycroft Holmes29-Sep-10 12:09
professionalMycroft Holmes29-Sep-10 12:09 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Roger Wright29-Sep-10 17:00
professionalRoger Wright29-Sep-10 17:00 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
MSBassSinger30-Sep-10 3:24
professionalMSBassSinger30-Sep-10 3:24 
I am a firm believer in not passing datasets (or recordsets) around as universal data objects. I create objects that represent the real-world object, and aggregations of those objects where it makes sense. Those objects may span more than one table, the the consumers of my objects have no knowledge of a database.

For aggregation objects, I create a class that inherits from CollectionBase. That allows me to add a class within the aggregation class that inherits from IComparer so I can provide sorting capabilities. The aggregation class contains the code to handle CRUD, and to allow specifying a filter for querying.

The class that is used for the objects (the item class) collected by the aggregation class inherits from IDataObjectBase. The item class has code to validate, indicate if any values have been changed, etc.

That allows me to use both the aggregation class and the item class for objects that easily bind and can be found in VS's Data Source Explorer.

In a few cases, where I need hierarchical objects, an aggregation class can also be a property within an item class.

Yes, it takes more coding than passing around datasets, but it is more durable. Besides, once you have the first one coded the way you want, you can use it as a template for others, which reduces the coding time.
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Mycroft Holmes30-Sep-10 12:03
professionalMycroft Holmes30-Sep-10 12:03 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
MSBassSinger30-Sep-10 12:24
professionalMSBassSinger30-Sep-10 12:24 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
patzerFish30-Sep-10 4:20
patzerFish30-Sep-10 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.