Scanning Program (FOLDER to DATABASE)

May 24 2012 11:21 AM
Hey i working with a Database in Access and i have started with a program that scans file ends (.rar, .jpg, .mp4, .dem) and im new to this connection strings through Databases i would really appreciate some help with the code for the connections it looks like this right now:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data.OleDb;

namespace Scanner
{
    class Program
    {
        static void Main(string[] args)
        {

            string[] filePaths = Directory.GetFiles("C:\\Windows\\system32");
            foreach (string file in filePaths)
            {
                string filetype = file.Split('.')[file.Split('.').Length - 1];
                    switch (filetype)
                {
                    case "jpg":
                        // Code to add into the Database, into the Table for Grenade Pictures
                        break;
                    case "mp4":
                        // Code to add into the Database, into the Table for Videos
                        break;
                    case "rar":
                        // Code to add into the Database, into the Table for Configs
                        break;
                    case "dem":
                        // Code to add into the Database, into the Table for Demos
                        break;
                    case "pdf":
                        // Code to add into the Database, into the Table for Tactics
                        break;
                    default:
                        break;
                }
            }
        }
    }
}