Ejemplo n.º 1
0
 public static int NextGeneratorValue(string generator)
 {
     try
     {
         return(Convert.ToInt32(SqlText.ExecuteScalar(string.Format("SELECT NEXT VALUE FOR {0} FROM RDB$DATABASE", generator))));
     }
     catch (Exception)
     {
         return(0);
     }
 }
Ejemplo n.º 2
0
 public static int NextSequenceValue(string sequence)
 {
     try
     {
         return(Convert.ToInt32(SqlText.ExecuteScalar(string.Format("select {0}.nextval from dual", sequence))));
     }
     catch (Exception)
     {
         return(0);
     }
 }