Re: Datasets - Best approach to use?

From: Mitchell Vincent (mitchell.vincent_at_gmail.com)
Date: 01/12/05


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. 


Relevant Pages

  • RE: Automated Import Newbee needs help
    ... use Office Access 2007 to replicate a database that was created in an earlier ... Dave Hargis, Microsoft Access MVP ... "terry" wrote: ...
    (microsoft.public.access.externaldata)
  • RE: PLEASE HELP!!!! License information for this component not fou
    ... "Dave" wrote: ... "Klatuu" wrote: ... can't refresh the links it has to another database file. ... equivalent version Access Run Time license. ...
    (microsoft.public.access.gettingstarted)
  • Re: Can a Confimration Field Value be used is asp coding?
    ... "Dave" wrote in message ... >> flexibility and thereby eliminate most of the FP database component ... >> ClassID is a unique number which I am using to drive other pages ... >> The problem is the confirmation page. ...
    (microsoft.public.frontpage.client)
  • Re: Subject: Re: OT: Dont create tables owned by informix -
    ... >> own and administer the database. ... >> There are going to be times when this is impossible - and Dave may be ... In a small shop, the same small group of people end up with all roles, so ... Using sudo is a sensible and reasonable mechanism - and it is largely safe. ...
    (comp.databases.informix)
  • Re: Database Editor Returns No Results
    ... Dave wrote: ... >> of the records in your database table. ... >> Microsoft FrontPage MVP ... >> Spider Web Woman Designs ...
    (microsoft.public.frontpage.client)

Loading