Ok new to Asp.net and have tried to use the new Oracle Package Wizard to generate the c# code to the Oracle package trying to interface.
I create a ref to the Auto created class as follows:
HrdsnPkg classref = new HrdsnPkg();
How do a setup a connection using this auto generated package
Calling something like:
classref.Connection.ConnectionString = "someserver.com etc....";
causes a null ref error...
I want to call this after the connection part is figured out would this call be correct:
OracleCursor pCursor;
Decimal pErrorlogid;
classref.GetPicklistcompany( out pCursor, out pErrorlogid);
Thanks
Package Wizard Question
Thanks for the help .. but I figured it out ... Best Regards.
Here was the solution:
HrdsnPkg classref = new HrdsnPkg();
classref.Connection = new OracleConnection( "some connection string" );
classref.Connection.Open();
try
{
OracleCursor pCursor;
Decimal pErrorlogid;
classref.GetPicklistcompany( out pCursor, out pErrorlogid);
CoreLab.Oracle.OracleDataAdapter test = new OracleDataAdapter( );
DataSet ds = new DataSet();
test.Fill(ds, "result", pCursor);
}
finally
{
classref.Connection.Close();
GC.Collect();
}
Here was the solution:
HrdsnPkg classref = new HrdsnPkg();
classref.Connection = new OracleConnection( "some connection string" );
classref.Connection.Open();
try
{
OracleCursor pCursor;
Decimal pErrorlogid;
classref.GetPicklistcompany( out pCursor, out pErrorlogid);
CoreLab.Oracle.OracleDataAdapter test = new OracleDataAdapter( );
DataSet ds = new DataSet();
test.Fill(ds, "result", pCursor);
}
finally
{
classref.Connection.Close();
GC.Collect();
}