none
Could not find output table oledbexception

    Question


  • I am getting the following oledb excepion

    "Could not find output table 'tablename'. "

    code:
    OleDbConnection conntraveldata = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=E:\\Documents and Settings\\Administrator\\Desktop\\stephenwalther\\cs\\Authors.mdb");
                    conntraveldata.Open();
     OleDbCommand Command = new OleDbCommand(strinsert, conntraveldata);
                    Command.Parameters.AddWithValue("@Date1",dateTimePicker1.Value);
                    Command.Parameters.AddWithValue("@modelofvehicle",txtmodelofvehicle.Text);
                    Command.Parameters.AddWithValue("@place",txtplace.Text);
                    Command.Parameters.AddWithValue("@customername", txtcustomername.Text);
                    Command.Parameters.AddWithValue("@idno", txtidno.Text);
                    Command.Parameters.AddWithValue("@drivername", txtdrivername.Text);
                    Command.Parameters.AddWithValue("@kilometer", txtkilometer.Text);
                    Command.Parameters.AddWithValue("@hours", txthours.Text);
                    Command.Parameters.AddWithValue("@extrakilometer", txtextrakilometer.Text);
                    Command.Parameters.AddWithValue("@extrahour", txtextrahour.Text);
                    Command.Parameters.AddWithValue("@rate", txtrate.Text);
                    Command.Parameters.AddWithValue("@rateextrakm", txtrateextrakm.Text);
                    Command.Parameters.AddWithValue("@rateextrahr", txtrateextrahr.Text);
                    Command.Parameters.AddWithValue("@total", txttotal.Text);
                    Command.ExecuteNonQuery();
                    conntraveldata.Close();
                }
                catch (OleDbException exception)
                {
                    for (int i = 0; i < exception.Errors.Count; i++)
                    {
                        MessageBox.Show("Index #" + i + "\n" +
                               "Message: " + exception.Errors[i].Message + "\n" +
                               "Native: " + exception.Errors[i].NativeError.ToString() + "\n" +
                               "Source: " + exception.Errors[i].Source + "\n" +
                               "SQL: " + exception.Errors[i].SQLState + "\n");
                    }
                }


    Thursday, October 30, 2008 5:47 AM

Answers

All replies