我的错在什么地方,请指教!!
ypdff 2003-10-18 01:39:17 private void Button1_Click(object sender, System.EventArgs e)
{string insertCmd="insert into Users vluses(@login_name,@customer_passwd)";
SqlConnection myConnection=new SqlConnection "server=HIGHPOINT;uid=sa;pwd='******';database=ClcStore");
SqlCommand myCommand=new SqlCommand(insertCmd,myConnection);
myCommand.Parameters.Add(new SqlParameter("@login_name",SqlDbType.NVarChar,16));
myCommand.Parameters["@login_name"].Value=TextBox1.Text;
myCommand.Parameters.Add(new SqlParameter("@customer_passwd",SqlDbType.NVarChar,16));
myCommand.Parameters["@customer_passwd"].Value=TextBox2.Text;
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
}