actually the code above wont work unless the data objects you are referencing are design time bound to your database

If you are trying to create the connection through code you should use OLEDB and either Use the OLEDBCommands specifiying each sql statement in code, or you can create a dataset via code and create an instance of an OLEDBDataadapter bind to the dataadapter an Instance of the OLEDBCommandBuilder, you still have to mainly specify the sql Select statement for the dataadapter but basically the builder will dynamically take care of the rest for you.