While trying to deploy a WFA in client's machine I click this "Insertar" button and this error pops up: enter image description here
I managed to know the error is in the following line:
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
--> cmd.CommandText = "insert into [dbo].[Table] values('" + numRefInternoTxt.Text + "','" + numAsientoPrevioTxt.Text + "','" + fechaMovimientoDTP.Value.Date + "','" + fechaContableDTP.Value.Date + "','" + tipoMovimiento + "','" + infoAdicDifDeMenos + "','" + regimenFiscal + "','" + tipoOperacion + "','" + numeroOperacionTxt.Text + "','" + descripcionTxt.Text + "','" + codUnidadDeFabricacionTxt.Text + "','" + tipoJustificante + "','" + numeroJustificanteTxt.Text + "','" + tipoDocIdentificativoTxt.Text + "','" + numeroIdentificativoTxt.Text + "','" + razonSocialTxt.Text + "','" + caeTxt.Text + "','" + repTipoDocIdentificativoTxt.Text + "','" + lblRepNumDocId.Text + "','" + repRazonSocialTxt.Text + "','" + epigrafe + "','" + clave + "','" + codEpigrafe + "','" + referenciaProductoTxt.Text + "','" + codigoNCTxt.Text + "','" + densidadTxt.Text + "','" + cantidadTxt.Text + "','" + unidadDeMedida + "','" + descripcionProductoTxt.Text + "','" + gradoAlcoholicoTxt.Text + "','" + cantidadAlcoholPuroTxt.Text + "','" + numeroEnvasesTxt.Text + "','" + tipoEnvase + "','" + capacidadEnvaseTxt.Text + "','" + observacionesTxt.Text + "')";
cmd.ExecuteNonQuery();
con.Close();
I tried adding ".ToString()" method to the date-typed data (like this: fechaMovimientoDTP.Value.Date.ToString()) but still drops the same error.
Any clues?