I need to show where the account is going so that when printing is shown and with this code sumo 1 to the consecutive
// contar 1 al consecutivo cuando imprima
var oracleConnectionStringBuilder = new OracleConnectionStringBuilder
{
DataSource = _cnnString,
UserID = _schema,
Password = _pswSchema
};
OracleConnection con = new OracleConnection(oracleConnectionStringBuilder.ToString());
OracleCommand oracommand = new OracleCommand("get_secuencia", con);
oracommand.CommandType = CommandType.StoredProcedure;
//OracleDataReader lector;
try
{
con.Open();
oracommand.Parameters.Add("consec", OracleDbType.Int32).Direction = ParameterDirection.Output;
oracommand.ExecuteNonQuery();
LNumDoc.Text = oracommand.Parameters["consec"].Value.ToString();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "xxxxx");
}
con.Close();
As I do to show the current value of the sequence, try CURRVAL but you can not use it without NEXTVAL that makes it add 1 to the sequence