title: C# and PostgreSQL INSERT INTO
body: <p>I have this:</p>
  
  <pre><code>NpgsqlConnection c = new NpgsqlConnection(conx.getConexion());
  c.Open();
  NpgsqlDataAdapter da = new NpgsqlDataAdapter("Insert into \"Marca\" (\"NombreMarca\") values ('" + cbMarca.Text + "')", c);
  c.Close();
  </code></pre>
  
  <p>And the table is:</p>
  
  <pre><code>CREATE SEQUENCE idmarca
    INCREMENT 1
    MINVALUE 1
    MAXVALUE 2147483647
    START 10
    CACHE 1;
  
  CREATE TABLE "Marca"
  ( "idMarca" integer NOT NULL DEFAULT nextval('idmarca'::regclass),
    "NombreMarca" character varying(100) NOT NULL,
    CONSTRAINT "PKMarca" PRIMARY KEY ("idMarca" ),
    CONSTRAINT "UNombreMarca" UNIQUE ("NombreMarca" )
  );
  </code></pre>
  
  <p>The problem is, when I try to insert into the table, for some reason nothing happens. That's on a try - catch, so no exceptions are being generated from the query.
  <code>cbMarca</code> is a combobox. The connection with the database is already tested.</p>
  
  <p>Also, this works:</p>
  
  <pre><code>cbMarcaB.Items.Clear();
  DataTable dt = cons.Select("Select \"NombreMarca\" From \"Marca\" Order by \"NombreMarca\"");
  for (int i = 0; i &lt; dt.Rows.Count; i++)
       {
           cbMarcaB.Items.Add(dt.Rows[i]["NombreMarca"]);
       }
  </code></pre>
  
  <p>So I don't know what the problem is ...</p>