Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
this error is giving me while hosting site...but onlocal host it is working properly ..
please help me ..
thanks in Advance ...
my code is
C#
protected void btnsignup_Click(object sender, EventArgs e)
{
        if (txtuname.Text != string.Empty && txtmailid.Text != string.Empty && txtmobile.Text != string.Empty && txtpwd.Text != string.Empty)
        {
            con.Open();
            OdbcCommand cmd = new OdbcCommand("Insert into LOGIN (U_name,U_Email,U_Mobile,U_password) values(?,?,?,?)", con);
            cmd.Parameters.AddWithValue("username", txtuname.Text);
            cmd.Parameters.AddWithValue("useremail", txtmailid.Text);
            cmd.Parameters.AddWithValue("usermobile", txtmobile.Text);
            cmd.Parameters.AddWithValue("userpassword", txtpwd.Text);
            cmd.ExecuteNonQuery();
            con.Close();
            clear();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alertmessage", "javascript:alert('Sign up successfully , please enter your username and password ,have a nice time ')", true);

            Panel2.Visible = false;
            Panel1.Visible = true;
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alertmessage", "javascript:alert('Fields cannot be left blank  ')", true);

        }

    }
Posted
Updated 5-Jun-13 22:26pm
v2
Comments
Zoltán Zörgő 6-Jun-13 4:26am    
It is likely that you have privilege problems. Check what statement is throwing this, and check the user's right on the affected tables.
Amirsalgar1 6-Jun-13 4:31am    
in database settings?

1 solution

Have a look at how you are configuring the ODBC connection.
Site http://www.connectionstrings.com[^] could be of some assistance to you.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900