static void Main(string[] args)
{
string[,] fp = readFilePaths();
OleDbConnection con = new OleDbConnection();
OleDbDataAdapter da;
DataSet ds = new DataSet();
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/kyalanur/Desktop/Nav tool/PCGDataManager.mdb;User ID=;Password=;";
string sq = "SELECT * FROM History";
con.Open();
da = new OleDbDataAdapter(sq, con);
da.Fill(ds, "History");
for (int i = 0; i < 284; i++)
{
if(true)
{
//Enter into the dtabase
DataRow dr = ds.Tables["History"].NewRow();
dr[0] = DateTime.Today.Date.ToString();
dr[0] = fp[i,2];
dr[2] = generateFilePath(fp[i, 0], fp[i, 1]);
dr[3] = " ";
dr[4] = " ";
dr[5] = fp[i, 3];
ds.Tables["History"].Rows.Add(dr);
//OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
//da.UpdateCommand = cb.GetUpdateCommand();
da.Update(ds, "History");
}
else
{
}
}
}
anurag.kyal 0 Newbie Poster
anurag.kyal 0 Newbie Poster
WildBamaBoy 19 Junior Poster
anurag.kyal 0 Newbie Poster
Momerath 1,327 Nearly a Senior Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.