Oracle - Check the tables, rows (dataset), how to insert dataset into oracle

  • Thread starter Thread starter Markus Freitag
  • Start date Start date
M

Markus Freitag

Guest
Hello,
I have received the following description from a customer.

I found this link, but I need it in C#.


Customer use 11G.
I installed
Assembly Oracle.ManagedDataAccess
C:\Program Files (x86)\Oracle Developer Tools for VS2017\odp.net\managed\common\Oracle.ManagedDataAccess.dll



GET_SERIAL_NUMBERS1417470.jpg

My first question is, how can I question the values?
Do I need to know the table names?
Do I need to know the table/columns names?
Can I bring the result into a dataset, then look there what names it contains?
Then I don't need an ExecuteNonQuery?

using (OracleConnection connection = new OracleConnection(Cfg.DbConnectionstring))
{
OracleCommand cmd = new OracleCommand("La.GETSERIALNUMBERS", connection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("pInbatch_id", OracleDbType.Varchar2, "SupplierXY-19-03-19", ParameterDirection.Input);

cmd.Parameters.Add("pOutunprocessedCount", OracleDbType.Varchar2, ParameterDirection.Output);
cmd.Parameters.Add("pOutError_message", OracleDbType.Varchar2, ParameterDirection.Output);

cmd.ExecuteNonQuery();

OracleDecimal d = (OracleDecimal)cmd.Parameters["pOutunprocessedCount"].Value;
int retValue = d.ToInt32();
Can someone publish an example for me? Thank you in advance.
My second question is
After the process, I have the result table.
I want to pass the reult table and send the StoredProcedure with it. How can I do that?
// --------------------------------------------------------------
My third question, general.
I do not have an Oracle license.
Which tool can I use for test? Maybe this one?TOAD for Oracle Download Free for Windows 10, 7, 8/8.1 (64 bit / 32 bit)
Do you have here information for me for connection string?

<DATABASE connectionstring="Data Source=192.168.0.123:1521;User ID=demo; Password=test14;"/>

Best regards, Markus

Continue reading...
 
Back
Top