Problems fro begginer.

From: Reinaldo Coelho Sartorelli (reinaldo_sartorell..ahoo.com.br)
Date: Wed Jul 28 2004 - 19:02:40 EDT

  • Next message: Shishir K. Singh: "Integration with Spring Framework"

    Hi all.

    I'm a new user of Cayenne and PostgreSQL, and i try create a insert method,
    but not return error and not insert values.

    The table :
            Generos(Codigo Integer, Descricao Varchar(255));

    This is a code :

                    try{
                            DataContext con = DataContext.createDataContext();
                            Generos y = new Generos(con);

                            Integer id = new Integer(1);
                            y.setCodigo(id);
                            y.setDescricao("Teste");
                            System.out.println("ID:" + y.getCodigo());
                            System.out.println("Name:" + y.getDescricao());
                            con.commitChanges();
                    }
                    catch(Exception e){
                            System.out.println(e.getMessage());
                    }

    Tks for all.
    Reinaldo.

    PS: Sorry my english.



    This archive was generated by hypermail 2.0.0 : Wed Jul 28 2004 - 19:02:16 EDT