Debbie,
SELECT * FROM customers WHERE state = @CurState
Have than a look for the OleDb parameter class to fill that
http://msdn.microsoft.com/library/de...classtopic.asp
>
> 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?
>
With an access database that is the connection approach a good approach,
with any other database not.
To use one dataset means that you should place the dataset global using a
shared class or whatever. Or give all the time the reference of the dataset
to the forms which is using that when it is instanced.
(By instance by creating an overloaded Sub New)
I hope this helps?
Cor