Click here to Skip to main content
15,886,362 members
Home / Discussions / Database
   

Database

 
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 
GeneralRe: Data Binding, Combo Boxes, and Related tables. Pin
Mycroft Holmes30-Sep-10 11:53
professionalMycroft Holmes30-Sep-10 11:53 
AnswerRe: Data Binding, Combo Boxes, and Related tables. Pin
underclocker30-Sep-10 6:00
underclocker30-Sep-10 6:00 
Questionnew line Pin
scottichrosaviakosmos25-Sep-10 23:00
scottichrosaviakosmos25-Sep-10 23:00 
AnswerRe: new line Pin
Mycroft Holmes25-Sep-10 23:40
professionalMycroft Holmes25-Sep-10 23:40 
AnswerRe: new line Pin
Corporal Agarn28-Sep-10 6:44
professionalCorporal Agarn28-Sep-10 6:44 
AnswerRe: new line Pin
bigbadben30-Sep-10 2:55
bigbadben30-Sep-10 2:55 
Question(INSERT EXEC statement cannot be nested.) and (Cannot use the ROLLBACK statement within an INSERT-EXEC statement.) how to solve this??!! Pin
Yajjoj25-Sep-10 9:43
Yajjoj25-Sep-10 9:43 
QuestionCreate Database in Oracle 9i Pin
MohanMbnr25-Sep-10 3:01
MohanMbnr25-Sep-10 3:01 
AnswerRe: Create Database in Oracle 9i Pin
Eddy Vluggen25-Sep-10 12:01
professionalEddy Vluggen25-Sep-10 12:01 
QuestionCreate database to share folder Pin
ndkit24-Sep-10 15:50
ndkit24-Sep-10 15:50 
AnswerRe: Create database to share folder Pin
Eddy Vluggen25-Sep-10 0:56
professionalEddy Vluggen25-Sep-10 0:56 
QuestionQuery Improvement Related to Lounge Post Pin
programmervb.netc++24-Sep-10 11:07
programmervb.netc++24-Sep-10 11:07 
AnswerRe: Query Improvement Related to Lounge Post Pin
Luc Pattyn24-Sep-10 11:29
sitebuilderLuc Pattyn24-Sep-10 11:29 
GeneralRe: Query Improvement Related to Lounge Post Pin
programmervb.netc++24-Sep-10 11:35
programmervb.netc++24-Sep-10 11:35 

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.