Hi All
Can someone tell me if I am doing this correctly, or can possibly suggest better ways, if I'm not doing this correctly.
I have a windows application that I am writing,So I have a UI and I have another class that handles the inserts,updates etc to a specific table/s in the database,(I actually have multiple classes that do more or less the same thing, but for different sets of tables in the database) Then in my UI code I have a dataset that I fill by calling a method from one of my classes, that returns a datatable, and I add that table to my dataset in the UI. When I want to add/delete/update data, I do so in the UI's dataset and send the specific datatable in the ui's dataset to the class to update the database. Am I doing this correctly?
I'm sure there is probably a way to cut out the multiple classes for each table or set of tables, like create a base class? but how do I do that? Anyone got any links I can go to for this - if it is a better solution? I did this "multiple classes for tables/sets of tables" because of the layout of the tables, each table of course has different column names, and data types, and there are times when I need to reference a specific column etc.
But overall, am I approaching this correctly? Any insight into streamlining this is greatly appreciated. Thanks alot
Kevin - C# Beginner 1 1338
On Thu, 5 Feb 2004 21:31:06 -0800, "Kevin"
<an*******@discussions.microsoft.com> wrote: Hi All
Can someone tell me if I am doing this correctly, or can possibly suggest better ways, if I'm not doing this correctly.
I have a windows application that I am writing,So I have a UI and I have another class that handles the inserts,updates etc to a specific table/s in the database,(I actually have multiple classes that do more or less the same thing, but for different sets of tables in the database) Then in my UI code I have a dataset that I fill by calling a method from one of my classes, that returns a datatable, and I add that table to my dataset in the UI. When I want to add/delete/update data, I do so in the UI's dataset and send the specific datatable in the ui's dataset to the class to update the database. Am I doing this correctly?
I'm sure there is probably a way to cut out the multiple classes for each table or set of tables, like create a base class? but how do I do that? Anyone got any links I can go to for this - if it is a better solution? I did this "multiple classes for tables/sets of tables" because of the layout of the tables, each table of course has different column names, and data types, and there are times when I need to reference a specific column etc.
But overall, am I approaching this correctly? Any insight into streamlining this is greatly appreciated. Thanks alot
Kevin - C# Beginner
Maybe you could have a look at typed datasets. http://www.c-sharpcorner.com/Code/20...edDataSets.asp
--
Ludwig
mailto:ludwig_(nospamplease)stuyck@pandora(nospamp lease).be This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Viken Karaguesian |
last post by:
Hello all,
I'm taking a shot at table-less design, but I feel like I'm poking in the
dark here. I decided to try and recreate the main page of a webiste that I
run, www.sayatnova.com, using CSS...
|
by: Sims |
last post by:
Hi,
I have a function that looks something like ....
void Function( std::string &oldval )
{
int iSome_size = xxx; // get some size
char *tmp = NULL;
tmp = new char;
|
by: Chris Uwins |
last post by:
Hi there, i know theres a number of ways I can achieve this but want
to know the best, (but still quite simple).
Up until a year ago I never used Access but have designed a few
databases for...
|
by: Ed Jay |
last post by:
Well, nobody in alt.html wants to answer this question, so I'll ask it
here:
I have a button and associated text in a container. When one clicks the
button it brings up additional buttons and...
|
by: esebastian |
last post by:
Hello Everyone,
I would just like some advice to make sure i am doing what i want to
do the right way because i don't think i am.
I have a form that contains checkboxes. The checkboxes are...
| |
by: Nightcrawler |
last post by:
I hope this is the right group for this question.
I recently started looking into AJAX and I am doing the following:
I have a repeater (dummydata) that is bound to a datatable (Articles).
Each...
|
by: Benoit Lefebvre |
last post by:
Weird subject you will say.. I didn't know what to put in there..
Long story short, I'm changing the value of a variable from a
function.. Nothing unusual there..
How come the value of the...
|
by: jmDesktop |
last post by:
I have a food menu. Each area, like beverages, grill, etc. have items
under them, Coke, Tea, Coffee would be under beverages for example.
I want to add a new drink to beverages. In my database...
|
by: r035198x |
last post by:
I have put together this article to give people starting Swing an awareness of issues that need to be considered when creating a Swing application. Most of the Swing tutorials that I have seen just...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |