NpgsqlCommand upCmd = new NpgsqlCommand("UPDATE masina SET nosaukums=@nosaukums, svar=@svars, sedvietu_sk=@sedvietu_sk, marka=@marka, modelis=@modelis WHERE id_masina=@id_masina", ncon);
upCmd.Parameters.Add(new NpgsqlParameter("@nosaukums", DbType.String,255,"nosaukums"));
upCmd.Parameters.Add(new NpgsqlParameter("@svars", DbType.Int32, sizeof(int),"svars"));
upCmd.Parameters.Add(new NpgsqlParameter("@sedvietu_sk", DbType.Int32, sizeof(int), "sedvietu_sk"));
upCmd.Parameters.Add(new NpgsqlParameter("@marka", DbType.String,255,"marka"));
upCmd.Parameters.Add(new NpgsqlParameter("@modelis", DbType.Int32, sizeof(int), "modelis"));
//upCmd.Parameters.Add(new NpgsqlParameter("@id_masina", DbType.Int32));
…