Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    10

    Unanswered: Multiple-step OLE DB operation generated errors. Check each OLE DB status value...

    Hi,

    I am trying to copy one database table to another database table. But when I run my copyier application I get this error message: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

    What does this message mean? How can I fix this error?

    The most important part of my code:

    OleDbConnection ConnSource = new OleDbConnection();
    OleDbConnection ConnTarget = new OleDbConnection();
    ConnSource.ConnectionString = @"Provider=Microsoft.Jet.Oledb.4.0;Data Source=C:\fox.mdb";
    ConnTarget.ConnectionString = @"Provider=Microsoft.Jet.Oledb.4.0;Data Source=C:\mod.mdb";
    ConnSource.Open();
    ConnTarget.Open();
    OleDbDataAdapter AdapterSource = new OleDbDataAdapter("SELECT f1, f2, f3 FROM basetable", ConnSource);
    OleDbDataAdapter AdapterTarget = new OleDbDataAdapter("SELECT d1, d2, d3 FROM newtable", ConnTarget);
    OleDbCommandBuilder CmdSource = new OleDbCommandBuilder(AdapterSource);
    OleDbCommandBuilder CmdTarget = new OleDbCommandBuilder(AdapterTarget);
    DataTable SourceTable = new DataTable();
    DataTable TargetTable = new DataTable();
    AdapterSource.Fill(SourceTable);
    AdapterTarget.Fill(TargetTable);

    for(int i=0; i<SourceTable.Rows.Count; i++)
    {
    DataRow drNewRow = TargetTable.NewRow();
    drNewRow["protokol"] = SourceTable.Rows[i]["protokol"];
    drNewRow["dosyatarihi"] = SourceTable.Rows[i]["tarih"];
    drNewRow["dosya"] = SourceTable.Rows[i]["kontrol"];
    TargetTable.Rows.Add(drNewRow);
    try
    {
    AdapterTarget.Update(TargetTable);
    }
    catch(System.Exception exc)
    {
    MessageBox.Show(exc.InnerException.ToString());
    }

    }

  2. #2
    Join Date
    Jul 2003
    Posts
    10
    Any help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •