I have problem which I am not sure how to resolve.
I am using "Loader" in my application. What I am doing is I am calling form, in which I am showing loading message, and I am running there some procedures on database. Some of them are returning results which I would like to access from other form. So I was trying to create global datareader in my one form...
public static SqlDataReader myReader = null;
and then I am calling my Loading form:
Loader loader = new Loader(myCommand.CommandText, true); //first parametr is command I want to run inside
loader.ShowDialog(this);
Inside I am trying to run SQL command I have send previously, and then I am trying to save results to my global variable.
Ana_Bloku_Info.myReader = myReader;
But when the loader is closed, and I am back in first form myReader has no data...