I want to use an sql database in my application. How do I connect to an SQL server database? Are there any examples? Could someone provide an example?

I was able to connect to an mdb (Access) file, but I do not believe Access will be able to fulfill my applications requirements for a database. I need to use SQL Server. I created a database and some tables in the database but I am not sure how to connect to it. It seems to hide the database in a server. Any ideas or examples?
Mike B