You can find information about connecting to databases here:
http://www.connectionstrings.com/[
^]
For inserting, updating, etc., there are many, many, many, many resources available for this. All you need is a bit of initiative to actually look for yourself.