vs2003+sql2000+iis6.0
运行时正常,参数和数据库结构一一对应,但是受影响行数为0.....数据库里没东西T_Tb/s结构代码如下:
web页代码private void ProcessNewAccount()
{
      if(Page.IsValid ==true)
        {
         if(BLL.Customer.addAccount(txtUserName.Text,  txtPassword.Text,txtEmail.Text, txtFirstName.Text, 
txtLastName.Text, txtAddress1.Text, txtAddress2.Text, 
txtCity.Text,listState.SelectedItem.Text,txtPostalCode.Text,
listCountry.SelectedItem.Text, txtTelephoneNumber.Text)==0)
 {
           Response.Redirect("ValidateAccount.aspx?action=errorAccount");
 }
else
{
            HttpCookie customerCookie=new HttpCookie("CustomerId",txtUserName.Text);
   Response .Cookies .Add(customerCookie);
           Response.Redirect("ValidateAccount.aspx?action=createAccount");
}
       }
}bll层代码public static int addAccount(string userid, string password, string email, string firstName, string lastName, string address1, string address2,string city, string state, string zip, string country, string phone)
{
    return DAL.Customer.addAccount(userid,password,email,firstName, lastName,address1,address2,city,state,zip,country, phone);
}
dal层代码public static int addAccount(string userid, string password, string email, string firstName,string lastName, string address1, string address2,string city, string state, string zip, string country,
string phone)
{
       SqlConnection connSql=new SqlConnection(SQLHelper.CONN_STRING);
SqlCommand commSql=new SqlCommand("insert into Account(Userid,Password,[E-mail],Firstname,Lastname,Add1,Add2,City,State,Zip,Country,Phone) value(@userid,@password,@email,@firstName,@lastName,@address1,@address2,@city,@state,@zip,@country,@phone)",connSql);
         commSql.Parameters .Add("@userid",userid);
         commSql.Parameters .Add("@password",password);
commSql.Parameters .Add("@email",email);
commSql.Parameters .Add("@firstName",firstName);
commSql.Parameters .Add("@lastName",lastName);
commSql.Parameters .Add("@address1",address1);
commSql.Parameters .Add("@address2",address2);
commSql.Parameters .Add("@city",city);
commSql.Parameters .Add("@state",state);
commSql.Parameters .Add("@zip",zip);
commSql.Parameters .Add("@country",country);
commSql.Parameters .Add("@phone",phone); int result=0;
try
            {
      connSql.Open();
      result=commSql.ExecuteNonQuery();
   }
          catch(Exception ex)
  {
      result=0;
  }
 finally
  {
      connSql.Close();
  }
 return result;
}