Access datasource through forms

  • Thread starter Thread starter Hemang Shah
  • Start date Start date
H

Hemang Shah

Hello

How can I access dataset defined on one form by all the other forms opened
by that form ?

Is that even possible ? if so, how ?

Thanks
 
Set up the dataset in one of two ways (depending on your setup).

1. As a static variable of a separate class
2. As a property of the parent form

In VB.NET, you can easily set up static variables (Shared is the keyword in
VB.NET) by adding a Module type (which is a shared class).


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
I'm sorry what does "static variable of a separate class" mean ?

My language is c# any code example would be highly appreciated.
 
ok its the static keyword in c#

but if I change my code:

private ClientManagementPro.dsClientT dsClient;



to



public static ClientManagementPro.dsClientT dsClient;

Every reference of dsClient in my code gives error.



So I guess if I can assign this dataset as a property of the class, that
would be great.



What i'm trying to do is, call this dataset in the subform which has the
crystal report viewer to display the data!

Thanks
 
Back
Top