PC Review


Reply
Thread Tools Rate Thread

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

 
 
COHENMARVIN@lycos.com
Guest
Posts: n/a
 
      27th Apr 2008
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
 
 
 
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      28th Apr 2008
Marvin,

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

Cor

<(E-Mail Removed)> schreef in bericht
news:63829249-0992-4e54-ac4b-(E-Mail Removed)...
>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
 
COHENMARVIN@lycos.com
Guest
Posts: n/a
 
      28th Apr 2008
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-(E-Mail Removed)...
>
> >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
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      28th Apr 2008
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

<(E-Mail Removed)> schreef in bericht
news:7b7a70a5-4c8c-498d-9ce4-(E-Mail Removed)...
> 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-(E-Mail Removed)...
>>
>> >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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make lots of changes to a database table using a dataset HONOREDANCESTOR@YAHOO.COM Microsoft ADO .NET 2 10th May 2007 07:38 PM
SQL Server dataset read from database A and write to database B RWC Microsoft ADO .NET 2 29th Jan 2007 08:31 PM
Failure to import a table to other database & make a copy in the same database Ray Microsoft Access 0 2nd Oct 2004 10:33 AM
Re: How do I make an editable database of addresses & make labels? Dayo Mitchell Microsoft Word New Users 0 15th May 2004 01:36 AM
Updating database from Typed Dataset without loading entire database Jeremy Summers Microsoft ADO .NET 2 10th Sep 2003 07:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:15 PM.