I have a few questions about databases. I would like to load only certain
records into a datagrid. For an example, with a list of customers I want to
only load the customers from California so in my SQL statement I say..
SELECT * FROM customers WHERE state = 'CurState'
I want CurState to be a variable that I can change in my program. Now if I
use the OleDBDataAdapter how do I pass that variable to the database?
also....
Is there a way I can open a connection to the database in my main form and
leave it open until I exit my application? What I am doing is using multiple
datagrids on different forms. Do I need a OleDbDataConnection,
OleDbDataAdapter and a Dataset on each form with a datagrid or can I do this
one time on the main form and have the other forms read the different tables
in the dataset on the main form?
I hope I explained this well enough. Thank you for any help you can give me.