Listo, lo encontre, este es un desarrollo que hice para MySQL pero es totalmente funcional tambien con SQLServer y sirve para ilustrarte lo que debes hacer con tu Insert.
Código C#:
Ver originalpublic int InsertNewOwner(string id_owner, string cod_owner, string name,
string telephone, string cellphone, string address, string mail)
{
int result = 0;
MySqlConnection cn = new MySqlConnection(Common.ConnectionString);
using (cn)
{
try
{
cn.Open();
MySqlParameter pIdOwner = new MySqlParameter("@ID_OWNER", MySqlDbType.String, 40) { Value = id_owner };
MySqlParameter pCodeOwner = new MySqlParameter("@COD_OWNER", MySqlDbType.String, 20) { Value = cod_owner };
MySqlParameter pName = new MySqlParameter("@NAME", MySqlDbType.String, 80) { Value = name };
MySqlParameter pTelephone = new MySqlParameter("@TELEPHONE", MySqlDbType.String, 45) { Value = telephone };
MySqlParameter pCellPhone = new MySqlParameter("@CELLPHONE", MySqlDbType.String, 45) { Value = cellphone };
MySqlParameter pAddress = new MySqlParameter("@ADDRESS", MySqlDbType.String, 80) { Value = address };
MySqlParameter pMail = new MySqlParameter("@MAIL", MySqlDbType.String, 80) { Value = mail };
query = "INSERT INTO tblowners " +
"(ID_OWNER, " +
"COD_OWNER, " +
"NAME, " +
"TELEPHONE, " +
"CELLPHONE, " +
"ADDRESS, " +
"MAIL) " +
"VALUES " +
"( " +
"@ID_OWNER, " +
"@COD_OWNER, " +
"@NAME, " +
"@TELEPHONE, " +
"@CELLPHONE, " +
"@ADDRESS, " +
"@MAIL " +
") ";
MySqlCommand cmd = new MySqlCommand(query, cn);
cmd.Parameters.Add(pIdOwner);
cmd.Parameters.Add(pCodeOwner);
cmd.Parameters.Add(pName);
cmd.Parameters.Add(pTelephone);
cmd.Parameters.Add(pCellPhone);
cmd.Parameters.Add(pAddress);
cmd.Parameters.Add(pMail);
result = cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
}
finally
{
cn.Close();
}
}
return result;
}