share dataset in all forms

05/07/2004 - 19:14 por Félix González | Informe spam
How can I share a SqlDataSet between all the forms of my application?, I´ve
create the dataset and fill it in the main form of my application and now I
need acess to the dataset in others forms.

thakns
 

Leer las respuestas

#1 pablo crosio
05/07/2004 - 19:32 | Informe spam
hola!

lo que podes hacer es crear una variable miembro publica
del formulario principal de tipo Dataset o una propiedad
publica de tipo Dataset.
si el formulario principal es un mdi padre, desde los
otros podras acceder al primero a traves de la propiedad
MdiParent y luego acceder a la varible o propiedad DataSet.
otra forma seria crear la variable o propiedad como
static.. de esta forma podrias accederla sin conocer la
instancia del formulario que la contiene.

salu2!!

pablo

How can I share a SqlDataSet between all the forms of my


application?, IŽve
create the dataset and fill it in the main form of my


application and now I
need acess to the dataset in others forms.

thakns


.

Preguntas similares