PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET How do you make a dataset when you cannot use a database for it?

Reply

How do you make a dataset when you cannot use a database for it?

 
Thread Tools Rate Thread
Old 27-04-2008, 06:43 PM   #1
COHENMARVIN@lycos.com
Guest
 
Posts: n/a
Default How do you make a dataset when you cannot use a database for it?


I have a challenge on my job: to make a gridview that depends on a
dataset that is not from a database. The reason for this is that
there are two gridviews plus some other data that have to be saved to
a database all at once.
To simplify a little, at the top of the form, the user enters two
numbers which describe how many rows each grid has to have. (He also
enters some other data). I guess he would click on a submit button
once he has those numbers. Then he has to enter all the data in the
all the rows for the 2 grids. The grid rows should have EDIT and
DELETE buttons.
At the end of all this, he enters a password and clicks on a submit
button. Only after he does all this can I save the grid information
(and the 2 numbers and the other data) to databases.
So it seems to me that I can't have each grid with a datasource of a
database, because it would be showing what it retrieves with its
SELECT statement, which at the start of the data-entry would be no
rows at all.
The original setup I had was that the user would fill out a row of
textboxes and checkboxes, and then he would hit a submit button, and
the data would be added to a database, and the grid would reflect the
new row added. I repeated this method for the 2nd grid. But I was
told that I should have an all-or-nothing operation - either all the
grids and other data are submitted (with a password), or nothing is.
Is there a way to do this?
Thanks,
Marvin
  Reply With Quote
Old 28-04-2008, 05:19 AM   #2
Cor Ligthert[MVP]
Guest
 
Posts: n/a
Default Re: How do you make a dataset when you cannot use a database for it?

Marvin,

A simple question, do you use a Session to store the dataset between the
sends?

Cor

<COHENMARVIN@lycos.com> schreef in bericht
news:63829249-0992-4e54-ac4b-72ade6ad11b4@m36g2000hse.googlegroups.com...
>I have a challenge on my job: to make a gridview that depends on a
> dataset that is not from a database. The reason for this is that
> there are two gridviews plus some other data that have to be saved to
> a database all at once.
> To simplify a little, at the top of the form, the user enters two
> numbers which describe how many rows each grid has to have. (He also
> enters some other data). I guess he would click on a submit button
> once he has those numbers. Then he has to enter all the data in the
> all the rows for the 2 grids. The grid rows should have EDIT and
> DELETE buttons.
> At the end of all this, he enters a password and clicks on a submit
> button. Only after he does all this can I save the grid information
> (and the 2 numbers and the other data) to databases.
> So it seems to me that I can't have each grid with a datasource of a
> database, because it would be showing what it retrieves with its
> SELECT statement, which at the start of the data-entry would be no
> rows at all.
> The original setup I had was that the user would fill out a row of
> textboxes and checkboxes, and then he would hit a submit button, and
> the data would be added to a database, and the grid would reflect the
> new row added. I repeated this method for the 2nd grid. But I was
> told that I should have an all-or-nothing operation - either all the
> grids and other data are submitted (with a password), or nothing is.
> Is there a way to do this?
> Thanks,
> Marvin


  Reply With Quote
Old 28-04-2008, 11:54 AM   #3
COHENMARVIN@lycos.com
Guest
 
Posts: n/a
Default Re: How do you make a dataset when you cannot use a database for it?

On Apr 28, 12:19 am, "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl>
wrote:
> Marvin,
>
> A simple question, do you use a Session to store the dataset between the
> sends?
>
> Cor

I don't think so. All the grids are on the same page, so there seems
to be no need to do that. But if I'm wrong, let me know.
-- Marvin

>
> <COHENMAR...@lycos.com> schreef in berichtnews:63829249-0992-4e54-ac4b-72ade6ad11b4@m36g2000hse.googlegroups.com...
>
> >I have a challenge on my job: to make a gridview that depends on a
> > dataset that is not from a database. The reason for this is that

>

  Reply With Quote
Old 28-04-2008, 05:47 PM   #4
Cor Ligthert[MVP]
Guest
 
Posts: n/a
Default Re: How do you make a dataset when you cannot use a database for it?

You need it,

As you send a page, everything goes totaly out of scope. A page is not
persistend.

Therefore you have to save before you do a send (in fact as all events are
done).

The nicest is for me for that the session item, because the dataset
serializes smootly in that.

You have to reinstall everything again as the page isposted back.

Cor

<COHENMARVIN@lycos.com> schreef in bericht
news:7b7a70a5-4c8c-498d-9ce4-9bd7a9f4a21b@x41g2000hsb.googlegroups.com...
> On Apr 28, 12:19 am, "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl>
> wrote:
>> Marvin,
>>
>> A simple question, do you use a Session to store the dataset between the
>> sends?
>>
>> Cor

> I don't think so. All the grids are on the same page, so there seems
> to be no need to do that. But if I'm wrong, let me know.
> -- Marvin
>
>>
>> <COHENMAR...@lycos.com> schreef in
>> berichtnews:63829249-0992-4e54-ac4b-72ade6ad11b4@m36g2000hse.googlegroups.com...
>>
>> >I have a challenge on my job: to make a gridview that depends on a
>> > dataset that is not from a database. The reason for this is that

>>


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off