How to create global dataset

  • Thread starter Thread starter Melson
  • Start date Start date
M

Melson

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
 
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.
 
If you declare the DS in Button1_Click event handler then it only exists
within Button1_Click. Make it a field for the class.
 
Back
Top