Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 09:15 AM
Authorized User
 
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to pass bulk data(dataset) between webpages

I badly need to know How to pass bulk data(dataset) between webpages. Please help....

 
Old September 16th, 2004, 09:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Please do not crosspost
http://p2p.wrox.com/topic.asp?TOPIC_ID=19282


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old September 16th, 2004, 12:30 PM
Registered User
 
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could do this by using the session object

Let's say you have a dataset.
your dataset name is "ds".


Session("dataset") = ds

to retreive.

ds = Session("dataset")


Good Luck!

 
Old September 16th, 2004, 01:48 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you retrieve the data from the Session again, you need to type cast it to the appropriate type.

VB.NET:

MyDataSet = CType(Session("dataset"), DataSet)
(or use DirectCast instead of CType)

C#:
MyDataSet = (DataSet) Session("dataset");

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Trash by KoRn (Track 14 from the album: Issues) What's This?
 
Old September 17th, 2004, 12:38 AM
Authorized User
 
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But using session for passing dataset(with lot of data)between pages consumes lot of resources. There should be some other way. Do any one know that?. It is important and urgent...Please.....

 
Old September 17th, 2004, 12:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

There aren't that many options left if you need to "pass data from page to page":

1. Storing it in a Session is a quick and easy way, but may indeed consume a lot of resources.

2. Store it in the cache. ASP.NET will automatically manage the cache. Once it gets full, it automatically deletes old items (those with the lowest priority). This way, it won't consume as much resources while you can still retrieve the data pretty quick.

3. Get it from the database again. Depending on your query and database server, this may not be as bad as it sounds. Of course it's slower than other methods but it may still be acceptable, performance wise.

Can you please not stress people up with "important and urgent"? Of course it's important and urgent,otherwise you wouldn't be posting here. But what may be important and urgent to you may have no importance to me. So, it's not very likely people are going to respond quicker when you say it's urgent .... Just a thought.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old September 17th, 2004, 09:26 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Regarding Imar's suggestions #2: Good idea, but remember that the cache is then application scope so if the dataset is specific to one user, the cache won't solve the problem.

Can you describe a bit more about how you are getting from one page to another? Depending on how you need to do it there may be a technique that will avoid the use of any of the state collections.
 
Old September 17th, 2004, 09:27 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I meant to ask: Are you redirecting to the new page? Or is the new page just coming up at some point in a user's session?
 
Old September 20th, 2004, 05:39 AM
Authorized User
 
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am using Modal Form Concept.
i have DataGrid in the popUp form.
and want to pass DataGrid values(or Dataset) to
Main(Base)Form.
Server.Transfer method Cannot be Used,Coz
Everytime the requsted form(Parent) is opening as New Page.
So....What is the Solution??????????

 
Old October 3rd, 2004, 11:46 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you use some kind of server side solution for this, then you would need your modal form to save the data, then tell the parent page to refresh. That's about the only way you can do it. A client-side solution would entail a good amount of javascript programming.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I pass new dataset to crystalreports? DPARK0312 Crystal Reports 0 December 26th, 2006 09:05 AM
Bulk upload of data Steve777 Classic ASP Professional 2 September 15th, 2006 12:59 AM
Pass variable to main form dataset spacky001 ASP.NET 1.0 and 1.1 Basics 2 September 13th, 2006 10:10 PM
how to pass the data from dataset to CR? zouky Crystal Reports 0 November 8th, 2004 02:49 AM
How to pass bulk data(dataset) between webpages jaisonkmathews General .NET 4 September 17th, 2004 09:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.