locked
Exception Details: System.Data.SqlClient.SqlException: Invalid object name RRS feed

  • Question

  • User53449276 posted

    Hi, I am trying to insert a web form into database. I got error message "Exception Details: System.Data.SqlClient.SqlException: Invalid object name .."

    My code as below:

    string strConn = WebConfigurationManager.ConnectionStrings["connectionstr"].ConnectionString;
    SqlConnection conn = new SqlConnection(strConn);

    conn.Open();
    SqlCommand comm = new SqlCommand();

    comm.CommandText = "Workorder";
    comm.CommandType = CommandType.StoredProcedure;
    comm.Connection = conn;

    comm.Parameters.AddWithValue("options", options);
    comm.Parameters.AddWithValue("title", txttitle.Text);
    comm.Parameters.AddWithValue("address_", txtaddress.Text);
    comm.Parameters.AddWithValue("address2", txtaddress2.Text);
    comm.Parameters.AddWithValue("city", txtcity.Text);
    comm.Parameters.AddWithValue("state_", txtstate.Text);

    comm.Parameters.AddWithValue("zip", txtzip.Text);
    comm.Parameters.AddWithValue("phone", txtphone.Text);
    comm.Parameters.AddWithValue("email", txtemail.Text);

    comm.ExecuteNonQuery();

    ...

    The application worked before. I just got a new laptop and installed new version of visual studio 2017. The application compiles fine. Not sure where the problem is.

    Saturday, August 11, 2018 2:08 AM

Answers

  • User753101303 posted

    Hi,

    And the full message is? It seems to be a db side error message. I believe it could be an error inside the Workorder SP.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 11, 2018 6:38 PM

All replies

  • User753101303 posted

    Hi,

    And the full message is? It seems to be a db side error message. I believe it could be an error inside the Workorder SP.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 11, 2018 6:38 PM
  • User53449276 posted

    The table was deleted accidentally Thanks..

    Sunday, August 12, 2018 1:23 AM