In c#, after executing Oracle insert statement, I want to return sequence value that has been assigned to inserted record in the table, which has sequence-based id increment trigger on it. And then I want to set textbox value to that new Id
.
I've tried that way after searching about, but the idea it not very clear to me:
can
id
be returned into textbox directly?Is the word
id
after thereturning
keyword, a column name?what should I do next?
INSERT INTO teams (name) VALUES ('West Ham United') RETURNING id INTO :textbox
I have also tired this
cmd.Parameters.Add(new OracleParameter(parameterName = ":OUT_CUST_ID", OracleDbType.Int64, direction = ParameterDirection.Output));