I try to use a function in an oracle package, that takes a CLOB IN parameter and returns a SYS_REFCURSOR.
the spec of the package is as follows:
PACKAGE EUCALYPTUS_PKG_DAL_RCG
is
function SearchMoleculesCSC(sMolfile in clob) return SYS_REFCURSOR;
I already went through the desciption in:
http://www.devart.com/blogs/dotconnect
/?p=5
but the problem is, that the return parameter of the function is inexistant in the C# part..
In entity developer, I created a model from database from the packages function an let ED create the method for the function as well.
Then I let ED generate the cod (.cd, MSL, SSDL and CSDL
The code generated from the packages function is as follows
Code: Select all
CSDL
MSL
SSDL
Generated CS code
//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Devart Entity Developer tool.
// Code is generated on: 29.07.2010 14:46:36
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Data;
using System.Data.Common;
[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata
#endregion
namespace MyModel
{
#region MyEntities
///
/// No Metadata Documentation available.
///
public partial class MyEntities : ObjectContext
{
#region Constructors
///
/// Initialize a new MyEntities object.
///
public MyEntities() :
base(@"metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=Devart.Data.Oracle;provider connection string=""User Id=im;Password=roger;Server=MSRWORK.WORLD;Direct=False;Persist Security Info=True""", "MyEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
///
/// Initializes a new MyEntities object using the connection string found in the 'MyEntities' section of the application configuration file.
///
public MyEntities(string connectionString) :
base(connectionString, "MyEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
///
/// Initialize a new MyEntities object.
///
public MyEntities(EntityConnection connection) : base(connection, "MyEntities")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
#endregion
#region Partial Methods
partial void OnContextCreated();
#endregion
#region ObjectSet Properties
#endregion
#region AddTo Methods
#endregion
#region Methods
///
/// There are no comments for Searchmoleculescsc in the schema.
///
public void Searchmoleculescsc (string SMOLFILE)
{
if (this.Connection.State != System.Data.ConnectionState.Open)
this.Connection.Open();
System.Data.EntityClient.EntityCommand command = new System.Data.EntityClient.EntityCommand();
command.CommandType = System.Data.CommandType.StoredProcedure;
command.CommandText = @"MyEntities.Searchmoleculescsc";
command.Connection = (System.Data.EntityClient.EntityConnection)this.Connection;
EntityParameter SMOLFILEParameter = new EntityParameter("SMOLFILE", System.Data.DbType.String);
if (SMOLFILE != null)
SMOLFILEParameter.Value = SMOLFILE;
command.Parameters.Add(SMOLFILEParameter);
command.ExecuteNonQuery();
}
#endregion
}
#endregion
}
Any guidance is greatly appreciated.
Thank you
Nic