Click here to Skip to main content
15,887,214 members
Home / Discussions / Database
   

Database

 
GeneralRe: Performance in Microsoft SQL Server Pin
Mehdi Ghiasi5-May-11 8:41
Mehdi Ghiasi5-May-11 8:41 
AnswerRe: Performance in Microsoft SQL Server Pin
wizardzz5-May-11 9:59
wizardzz5-May-11 9:59 
AnswerRe: Performance in Microsoft SQL Server [modified] Pin
Simon_Whale5-May-11 5:48
Simon_Whale5-May-11 5:48 
AnswerRe: Performance in Microsoft SQL Server Pin
PIEBALDconsult5-May-11 16:40
mvePIEBALDconsult5-May-11 16:40 
AnswerRe: Performance in Microsoft SQL Server Pin
Prasanta_Prince6-May-11 19:22
Prasanta_Prince6-May-11 19:22 
QuestionNeed some Oracle help if possible [modified] Pin
Michael J. Eber4-May-11 10:12
Michael J. Eber4-May-11 10:12 
AnswerRe: Need some Oracle help if possible Pin
Chris Meech5-May-11 3:37
Chris Meech5-May-11 3:37 
GeneralRe: Need some Oracle help if possible Pin
Michael J. Eber5-May-11 8:16
Michael J. Eber5-May-11 8:16 
Thanks Chris,

Since I normally work with Sql Server I'm out of water in this problem. I can pass any additional info you need to help me. Our code is a central service that gets passed a function and makes the call to the database:

[ServiceBehavior(IncludeExceptionDetailInFaults = true,
                    InstanceContextMode = InstanceContextMode.Single,
                    ConcurrencyMode = ConcurrencyMode.Single)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class DataService : SingletonDataServiceBase<String>, ISingletonDataServiceBase<String>
{
    protected override String OnFunctionRequest(string function)
    {
        try
        {
            OracleConnection oracleCon = new OracleConnection(ConfigurationManager.ConnectionStrings["CNRPConnectionString"].ConnectionString);
            OracleCommand sqlCom = new OracleCommand(
               string.Format( "begin   :REF_CUR := {0} ;end;", function), oracleCon);

            sqlCom.Parameters.Add("REF_CUR", OracleDbType.RefCursor, ParameterDirection.ReturnValue);

            OracleDataAdapter dataAdapter = new OracleDataAdapter();
            sqlCom.Connection.Open();
            sqlCom.ExecuteNonQuery();

            //Populate the DataSet and close the connection
            DataSet dataSet = new DataSet();
            dataAdapter.Fill(dataSet, "REF_CUR", (OracleRefCursor)(sqlCom.Parameters["REF_CUR"].Value));

            // Release rare resources immediately to prevent memory leaks and database locks
            sqlCom.Dispose();
            oracleCon.Close();
            oracleCon.Dispose();

            return this.Serialize(dataSet.Tables[0]);
        }
        catch (Exception Exp)
        {
            throw Exp;
        }
    }


When this method is call our insert function is passed as follows to Oracle:

CNRP_S_15_108_STRUCINF_I(7,null,'PWS Repository','Storage',0,null,null,null,null,0,null,null,null,null,null,-1,0,1995,0,0,null,null,0,-1,'16-May-11',-1,'13-Apr-11')


Hope this provides more information to you.
GeneralRe: Need some Oracle help if possible Pin
jschell5-May-11 8:30
jschell5-May-11 8:30 
GeneralRe: Need some Oracle help if possible Pin
Michael J. Eber5-May-11 8:47
Michael J. Eber5-May-11 8:47 
GeneralRe: Need some Oracle help if possible Pin
jschell6-May-11 11:04
jschell6-May-11 11:04 
GeneralRe: Need some Oracle help if possible Pin
Chris Meech5-May-11 8:31
Chris Meech5-May-11 8:31 
GeneralRe: Need some Oracle help if possible Pin
Michael J. Eber5-May-11 8:49
Michael J. Eber5-May-11 8:49 
GeneralRe: Need some Oracle help if possible Pin
Chris Meech5-May-11 8:53
Chris Meech5-May-11 8:53 
AnswerRe: Need some Oracle help if possible Pin
SilimSayo5-May-11 8:47
SilimSayo5-May-11 8:47 
QuestionHow to recover identity ID after insert in MSSQL 2008? Pin
Igor Jas3-May-11 7:15
Igor Jas3-May-11 7:15 
AnswerRe: How to recover identity ID after insert in MSSQL 2008? Pin
DaveAuld3-May-11 7:34
professionalDaveAuld3-May-11 7:34 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
Igor Jas3-May-11 11:07
Igor Jas3-May-11 11:07 
AnswerRe: How to recover identity ID after insert in MSSQL 2008? Pin
PIEBALDconsult4-May-11 1:38
mvePIEBALDconsult4-May-11 1:38 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
jschell4-May-11 8:47
jschell4-May-11 8:47 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
Mycroft Holmes5-May-11 3:46
professionalMycroft Holmes5-May-11 3:46 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
Chris Meech5-May-11 3:54
Chris Meech5-May-11 3:54 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
jschell5-May-11 8:07
jschell5-May-11 8:07 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
Igor Jas5-May-11 9:24
Igor Jas5-May-11 9:24 
GeneralRe: How to recover identity ID after insert in MSSQL 2008? Pin
Mycroft Holmes5-May-11 12:30
professionalMycroft Holmes5-May-11 12:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.