Re: Datasets - Best approach to use?
From: Mitchell Vincent (mitchell.vincent_at_gmail.com)
Date: 01/12/05
- Next message: DMI: "How to connect Multiple Combo Boxes?"
- Previous message: Michael D. Ober: "Re: MoveFirst doesn't move to the first record"
- In reply to: Dave Stumbles: "Datasets - Best approach to use?"
- Next in thread: William \(Bill\) Vaughn: "Re: Datasets - Best approach to use?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 09:24:37 -0500
I'm green with .NET, so please excuse me if I stumble around here.. I'm
having a lot of the same kinds of trouble wrapping my head around the
"dataset".
The way I see it is that the dataset gets a select, insert and update query
associated with it. I *think* that some databound controls, like the data
grid, can handle updating the database directly but I'm not entirely sure
how. I see it working in a few examples that I have but I really don't
understand what's going on under the hood..
In my previous web based and desktop programming experience you threw the
SQL server a query, got a result set back and delt with the data. It was
totally up to the programmer to formulate UPDATE/INSERT queries, maintain
state and throw the write queries back to the database for processing. With
.NET it seems like the data is much more accessible but it is much more
confusing as to what the "correct" way to do things is. A few direct
questions :
Is it OK to just throw the database an SQL query directly? UPDATE foo set
bar = 1, for instance. The answer might be obvious but I'm asking in case it
isn't!
How does the INSERT INTO my_table (example1,example2,example3) VALUES
(?,?,?) work in a dataset? Do you have to make the INSERT/UPDATE in the same
order that the data appears in the control? What I'm having a hard time
understanding is how the right value gets substituted in for the right
question mark.
So, Dave and I both are looking forward to the responses!
Thanks!
-- - Mitchell Vincent "Dave Stumbles" <Dave Stumbles@discussions.microsoft.com> wrote in message news:D8C8A27E-4C43-4E96-8153-EDC2D7ECBF56@microsoft.com... >I am writing a VB.NET 2003 web application to operate on my company's > intranet. It accesses data in an SQL Server database. I have developed a > couple of pages that display data successfully. However, there is one area > that I am having trouble getting a handle on, despite purchasing a couple > of > Wrox books.
- Next message: DMI: "How to connect Multiple Combo Boxes?"
- Previous message: Michael D. Ober: "Re: MoveFirst doesn't move to the first record"
- In reply to: Dave Stumbles: "Datasets - Best approach to use?"
- Next in thread: William \(Bill\) Vaughn: "Re: Datasets - Best approach to use?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|