TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Christoffer Bjorkman
NA
1
1.1k
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;
}
}
}
}
}
Reply
Answers (
0
)
Google translator in windows applications(winforms)
c# winforms DataGridView - how to set SelectedRow as a CurrentRow automatically ?