The first thing you need is a database--do you have one? Then, you need to build a proper connection string to connect to it with: http://www.connectionstrings.com/. How you proceed from here depends on the database type, but the basic, most common stuff, involves:
1) Opening a connection
2) Building a SQL command
3) Executing the command
There are infinite examples on the web, but if you cannot find some really "basic" examples for your database type, let us know what DB you are using and I'm sure we can point you to a few.