How do I connect a Windows Application (vb.net) to SQL Server DB...in visual studios
Posted on 2009-12-29
Thanks soooo much in advance for any help you can throw my way on this its really appreciated!
I am doing a project at the and i cant figure out for the life of me how to connect the DB (SQL server) to the Application (vb.net windows app).
I have the code to do it using an Access DB.... and the following code is contained in the module of the project!!
'declaring the database connection and database modules!
Friend objConnection As New OleDb.OleDbConnection( _
Friend objCustomerDA As New OleDb.OleDbDataAdapter("Select * from CustomerTable", _
Friend objCustomerCB As New OleDb.OleDbCommandBuilder(objCustomerDA)
Friend objDataSet As New DataSet()
Friend objAccountDA As New OleDb.OleDbDataAdapter("Select * from AccountTable",
Friend objAccountCB As New OleDb.OleDbCommandBuilder(objAccountDA)
But i was wondering if anyone could give me a step by step on how to do this for a SQL Database... is it the same or does visual studios allow this to be done in the background.. I'm so confused!