473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to create global dataset

Hi

I got a problem. I create a dataset in Button1_Click procedure. However, I
got error when I run myDS.table["mytable"].rows.count in Button2_Click
procedure.

Anyone know how to create a global dataset. Thanks.

Regards
Melson
Nov 17 '05 #1
2 4043
Melson,

What is the error that you are getting? If you want something that is
"global", then your field should be static, so that everything in the same
app domain can access the same instance.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Melson" <we****@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
Hi

I got a problem. I create a dataset in Button1_Click procedure. However, I
got error when I run myDS.table["mytable"].rows.count in Button2_Click
procedure.

Anyone know how to create a global dataset. Thanks.

Regards
Melson

Nov 17 '05 #2
If you declare the DS in Button1_Click event handler then it only exists
within Button1_Click. Make it a field for the class.
--

Derek Davis
dd******@gmail.com

"Melson" <we****@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl...
Hi

I got a problem. I create a dataset in Button1_Click procedure. However, I
got error when I run myDS.table["mytable"].rows.count in Button2_Click
procedure.

Anyone know how to create a global dataset. Thanks.

Regards
Melson

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mark Goldin | last post by:
I'd like to have a dataset that will be declared on a main ASPX page and visible in any custom or user control. Is there a way of doing that? Thanks
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
0
by: Rick Hein | last post by:
I've got a problem with an app I've been working on, the Caching object and events not firing correctly. In a nutshell: When I'm debugging, and I set a breakpoint in the removed item call back, the...
2
by: Billy Cormic | last post by:
Hello, I would would like to declare either a global table or a dataset so that I can access it when the page reloads. How can I do this? Do I make it a session variable? Can someone please...
2
by: tshad | last post by:
I have my error handling set up in Global.asax: Sub Application_Error(Sender As Object, E as EventArgs) In this procedure I call a function in a dll that will write out to a history file. ...
4
by: kuhrty | last post by:
I am using a window form and trying to get a dataset used in the form globally but I am having an issue setting the property and setting it locally to the class. When I try to call the dataset...
8
by: Hans Greif | last post by:
Hallo, hello, i try to implement a global dataset - singleton based. On www.bakterienforum.de i found a singleton implementation: sealed class SingletonCounter { public int Counter = 0;
13
by: Charles A. Lackman | last post by:
Hello, Is there a way to make a dataset global to all my aspx 2.0 web forms? Thanks, Chuck
3
by: Paulo | last post by:
Hi, I have a first button_click wich generates/fill a DataSet, etc, etc... and on a second button click I need to access the DataSet generated by the first button to manipulate some rows, etc,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.