Again I requesting your collaboration I have a problem which I have been analyzing without finding the error it generates the following error System.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword' OF '.'
Already verify in the database and the column has exactly that name and in the other part of the code I can not find the error
SqlCommand comando = new SqlCommand("insert into Arope(REGION,DEPENDENCIA,OPERACION,SIGLAUNIDAD,SECCION,DEPARTAMENTO,MUNICIPIO,OF,SUB,PT,TOTALFD,GR,NOMBRESYAPELLIDOS," +
"CEDULA,CARGO,UBICACION,MISION,ACTOADMIN,LATITUD,LONGITUD) values (@region,@dependencia,@operacion,@siglaUnidad,@seccion,@departamento,@municipio,@of,@sub,@pt,@totalFd,@gr,@nombresyapellidos,@cedula" +
"@cargo,@ubicacion,@mision,@actoAdmin,@latitud,@longitud)", conec);
comando.Parameters.Add("@region", SqlDbType.VarChar);
comando.Parameters.Add("@dependencia", SqlDbType.VarChar);
comando.Parameters.Add("@operacion", SqlDbType.VarChar);
comando.Parameters.Add("@siglaUnidad", SqlDbType.VarChar);
comando.Parameters.Add("@seccion", SqlDbType.VarChar);
comando.Parameters.Add("@departamento", SqlDbType.VarChar);
comando.Parameters.Add("@municipio", SqlDbType.VarChar);
comando.Parameters.Add("@of", SqlDbType.VarChar);
comando.Parameters.Add("@sub", SqlDbType.VarChar);
comando.Parameters.Add("@pt", SqlDbType.VarChar);
comando.Parameters.Add("@totalFd", SqlDbType.VarChar);
comando.Parameters.Add("@gr", SqlDbType.VarChar);
comando.Parameters.Add("@nombresyapellidos", SqlDbType.VarChar);
comando.Parameters.Add("@cedula", SqlDbType.VarChar);
comando.Parameters.Add("@cargo", SqlDbType.VarChar);
comando.Parameters.Add("@ubicacion", SqlDbType.VarChar);
comando.Parameters.Add("@mision", SqlDbType.VarChar);
comando.Parameters.Add("@actoAdmin", SqlDbType.VarChar);
comando.Parameters.Add("@latitud", SqlDbType.VarChar);
comando.Parameters.Add("@longitud", SqlDbType.VarChar);
comando.Parameters["@region"].Value = arope.Region;
comando.Parameters["@dependencia"].Value = arope.Dependencia;
comando.Parameters["@operacion"].Value = arope.Operacion;
comando.Parameters["@siglaUnidad"].Value = arope.Sigla;
comando.Parameters["@seccion"].Value = arope.Seccion;
comando.Parameters["@departamento"].Value = arope.Departamento;
comando.Parameters["@municipio"].Value = arope.Municipio;
comando.Parameters["@of"].Value = arope.Oficiales;
comando.Parameters["@sub"].Value = arope.NivelEje;
comando.Parameters["@pt"].Value = arope.Patrulleros;
comando.Parameters["@totalFd"].Value = arope.TotalFd;
comando.Parameters["@gr"].Value = arope.Grado;
comando.Parameters["@nombresyapellidos"].Value = arope.ApellidosNombres;
comando.Parameters["@cedula"].Value = arope.Cedula;
comando.Parameters["@cargo"].Value = arope.cargo;
comando.Parameters["@ubicacion"].Value = arope.UbicacionActual;
comando.Parameters["@mision"].Value = arope.Mision;
comando.Parameters["@actoAdmin"].Value = arope.ActoAdmi;
comando.Parameters["@latitud"].Value = arope.Latitud;
comando.Parameters["@longitud"].Value = arope.Longitud;
conec.Open();
int i = comando.ExecuteNonQuery();
conec.Close();
return i;
the error tells me in int i = command.ExecuteNonQuery (); I appreciate your collation because I do not see anything wrong in the code compiled and everything but when trying to give high to those data I jump to that error