public void PostgreSQLSequence(string tableName, string fieldName, ref int value) { JCursor cursor = new JCursor(this); cursor.Format(string.Format("select nextval('{0}_{1}_seq')::int", tableName.ToLower(), fieldName.ToLower()), 0); cursor.Run(); cursor.Read(); value = cursor.GetInt(0); }
public void OracleSequence(string tableName, string fieldName, ref int value) { JCursor cursor = new JCursor(this); cursor.Format(string.Format("select {0}Seq.NextVal from dual)", tableName), 0); cursor.Run(); cursor.Read(); value = cursor.GetInt(0); }