fix native sequence for oracle

This commit is contained in:
vpj-cd 2008-12-03 04:09:24 +00:00
parent 89382502cd
commit 76738f569b
1 changed files with 6 additions and 5 deletions

View File

@ -1086,7 +1086,7 @@ public class DB_Oracle implements AdempiereDatabase
}
public int getNextID(String Name) {
int m_sequence_id = DB.getSQLValue(null, "SELECT "+Name.toUpperCase()+".nextid FROM DUAL");
int m_sequence_id = DB.getSQLValue(null, "SELECT "+Name.toUpperCase()+".nextval FROM DUAL");
return m_sequence_id;
}
@ -1094,10 +1094,11 @@ public class DB_Oracle implements AdempiereDatabase
{
int no = DB.executeUpdateEx("CREATE SEQUENCE "+name.toUpperCase()
+ " INCREMENT BY " + increment
+ " MINVALUE " + minvalue
+ " MAXVALUE " + maxvalue
+ " START WITH " + start
+ " MIN VALUE " + minvalue
+ " MAX VALUE " + maxvalue, trxName);
+ " INCREMENT BY " + increment +" CACHE 20", trxName)
;
if(no == -1 )
return false;
else