SQL Query

In VS 2005, I have a login screen and I just need the code to add a SQL query and run it. I have a form with a binding navigator and I just draged the table from the Data Sources pane to the form. (There is probably some name for it but im not sure of it!)

I just need the code to apply a query!


Thanks guys,
Zack