本文介绍了获取错误:无效的对象名称'User_Information的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SqlCommand cmd = new SqlCommand("sp_userinformation", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@UserName", UserName);
                cmd.Parameters.AddWithValue("@Password", Password);
                cmd.Parameters.AddWithValue("@FirstName", FirstName);
                cmd.Parameters.AddWithValue("@LastName",LastName );
                cmd.Parameters.AddWithValue("@Email",Email );
                cmd.Parameters.AddWithValue("@PhoneNO", Phoneno);
                cmd.Parameters.AddWithValue("@Location", Location);
                cmd.Parameters.AddWithValue("@Created_By", Created_By);
                cmd.Parameters.Add("@ERROR", SqlDbType.Char, 500);
                cmd.Parameters["@ERROR"].Direction = ParameterDirection.Output;
                cmd.ExecuteNonQuery();
                message = (string)cmd.Parameters["@ERROR"].Value;
                con.Close();
            }
            else
            {
                Page.RegisterStartupScript("UserMsg", "<Script language='javascript'>alert('" + "Password mismatch" + "'); </script>");
            }
            lblErrorMsg.Text = message;







if (txtpwd.Text == txtcnmpwd.Text)
 {
 string UserName = txtuser.Text;
 string Password = txtpwd.Text;
 string ConfirmPassword = txtcnmpwd.Text;
 string FirstName = txtfname.Text;
 string LastName = txtlname.Text;
 string Email = txtEmail.Text;
 string Phoneno = txtphone.Text;
 string Location = txtlocation.Text;
 string Created_By = txtuser.Text;







i我在上面声明列名




i am declaring column name as above

推荐答案



这篇关于获取错误:无效的对象名称'User_Information的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 07:06