trimakassi
Programmer
my application was working perfectly well before i tried to refine it. I have an mdi form and 3 other forms. Before the problem, for every form i had a new connection to my database with the required adapters.
To make my application more effecient I thought of making one connection and connect all the needed adapters fro the mdi form then call the adapters from the different forms.
ex:
the following are set in main_menu
connection1
OledbDataadapter1
OledbDataadapter2
dsEmployee
Module
public module
public adapters as Main_menu
end class
now everytime i try filling a dataset from any form i use
adapters.Oledataadapter1.fill(dsEmployee)
this however seem not to be the correct i keep getting :
"An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an object."
trimakassi
To make my application more effecient I thought of making one connection and connect all the needed adapters fro the mdi form then call the adapters from the different forms.
ex:
the following are set in main_menu
connection1
OledbDataadapter1
OledbDataadapter2
dsEmployee
Module
public module
public adapters as Main_menu
end class
now everytime i try filling a dataset from any form i use
adapters.Oledataadapter1.fill(dsEmployee)
this however seem not to be the correct i keep getting :
"An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an object."
trimakassi