One of my client has this DAO for Oracle: public BigDecimal getNextPK(String tabName) { try { String cmd = "Select " + tabName + "_seq.nextval nextPK from dual"; RowSet cr = getRowSet(); cr.setCommand(cmd); BBug.log(cr.getCommand()); exec(); return cr.getBigDecimal("nextPK"); } catch (SQLException e) {BBug.log(e); return null; } }
hth "Vic C." < --- In [EMAIL PROTECTED], "Daniel Jaffa" <[EMAIL PROTECTED]> wrote: > First off, i love this idea, and when i get this install at my job will be very happy. > > Sorry for such a short question before. Looking at the code that will create the tables it seems as if you > are expecting the database to auto generate sequence numbers for you. This does not work in Oracle. > > Changing around the sql statements is not big deal, but does the internal code know the difference between db that auto-generate sequence numbers or not. > http://web.umr.edu/~oramaint/usage/serial-numbers.html > > > create table "base_content" ( > "id" serial primary key, > "image_small" bytea, > "field_n3" numeric(20, 2) > ); > > insert into "base_content" > ("headline_title", "short_code", "category_page", "category_section", "link_url", "link_display", "source_code", "source_email", "meta_keyw ords" , "approved_flag" ) > values > ('Java Developers go for dime a dozen', 'MAIN', 'cheap1','Headlines', 'http://www.theserverside.com', 'theserverside.com', 'load', '[EMAIL PROTECTED]','java, linux','Y'); > > So a basic question is has the basicPortal been tested in Oracle. > ------------------------ Yahoo! Groups Sponsor ---------------------~--> 4 DVDs Free +s&p Join Now http://us.click.yahoo.com/pt6YBB/NXiEAA/RN.GAA/NhFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ _______________________________________________ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.netbean.net/mailman/listinfo/mvc-programmers