locked
Unspecified error Oracle error occurred... RRS feed

  • Question

  • User-171042786 posted
    I dont understand this problem. I have copy pasted the error below. I'm hoping someone could help me resolve this. Thank you. The error: Unspecified error Oracle error occurred, but error message could not be retrieved from Oracle. Data type is not supported. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Unspecified error Oracle error occurred, but error message could not be retrieved from Oracle. Data type is not supported. Source Error: Line 78: da = New OleDbDataAdapter(strsql, Conn) Line 79: ds = New DataSet("dglist") Line 80: da.Fill(ds, "dglist") Line 81: da.Dispose() Line 82: Conn.Close() Source File: C:\Inetpub\wwwroot\BusinessManagementSystem\Pending\PendingAuthorization.aspx.vb Line: 80 Stack Trace: [OleDbException (0x80004005): Unspecified error Oracle error occurred, but error message could not be retrieved from Oracle. Data type is not supported.] System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +69 System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36 BusinessManagementSystem.PendingAuthorization.ListUpload() in C:\Inetpub\wwwroot\BusinessManagementSystem\Pending\PendingAuthorization.aspx.vb:80 BusinessManagementSystem.PendingAuthorization.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\BusinessManagementSystem\Pending\PendingAuthorization.aspx.vb:61 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750
    Sunday, April 26, 2009 5:43 AM

All replies

  • User579345625 posted

     Hello,

    Please post your code.

    --Anup Daware

    Sunday, April 26, 2009 4:21 PM
  • User364663285 posted
    Can you try to use an 'OracleCommand' instead of an Ole one and also make sure that your Sql*plus is working properly?
    Sunday, April 26, 2009 9:57 PM
  • User708331725 posted

    I'm also getting same error. Following is code used by many methods to retrieve data from oracle db. Rest all are working perfect. But only for one particular method i'm getting this error.

    1    Public Function test() As Boolean
    2    
    3            commandLibrarian = New OleDbCommand("PLIB_LIBRARIAN_PKG.GET_PLIB_USER", connectLibrarian)
    4            commandLibrarian.CommandType = CommandType.StoredProcedure
    5            Dim objOleDbDataAdapter As OleDbDataAdapter = New OleDbDataAdapter(commandLibrarian)
    6    
    7            commandLibrarian.Parameters.Add("P_U_NAME", OleDbType.VarChar).Value = "leena"
    8            commandLibrarian.Parameters.Add("P_GET_OPTION", OleDbType.VarChar).Value = "EXACT"
    9    
    10           Dim objDataSet As New DataSet
    11   
    12           Try
    13               objOleDbDataAdapter.Fill(objDataSet)
    14               Return True
    15   
    16           Catch ex As Exception
    17               objErrorLog.writeError(ex)
    18               Return False
    19           End Try
    20   
    21       End Function
    
     
    and error is, Exception: Unspecified error
    Oracle error occurred, but error message could not be retrieved from Oracle.
    Data type is not supported.
     
    Exception Source: Microsoft OLE DB Provider for Oracle
    whereas code below is working without any exceptions. I could not spot any diff in code and stored proc as well.
     
    1    commandLibrarian = New OleDbCommand("PLIB_LIBRARIAN_PKG.GET_PLIB_CATALOG_REGISTERED", connectLibrarian)
    2            commandLibrarian.CommandType = CommandType.StoredProcedure
    3            Dim adapt As OleDbDataAdapter = New OleDbDataAdapter(commandLibrarian)
    4    
    5            commandLibrarian.Parameters.Add("P_LOCN_SITE", OleDbType.VarChar).Value = locnSite
    6            commandLibrarian.Parameters.Add("P_CATR_ID", OleDbType.Integer).Value = -1
    7            commandLibrarian.Parameters.Add("P_CAT_ID", OleDbType.Integer).Value = -1
    8            commandLibrarian.Parameters.Add("P_CATR_REG_LABEL", OleDbType.VarChar).Value = regLabel
    9            commandLibrarian.Parameters.Add("P_GET_OPTION", OleDbType.VarChar).Value = "REG_LABEL"
    10   
    11           Dim dataset As New DataSet
    12           Try
    13               adapt.Fill(dataset)
    14           Catch ex As Exception
    15               MsgBox("Exception caught")
    16               objErrorLog.writeError(ex)
    17           End Try
    18           Return dataset
    
     

     I could not find any error. I'm using varchar/ String data type so dont understand which data type it is not supporting.

    Regards,

    Puneri

    Wednesday, June 10, 2009 4:40 AM
  • User364663285 posted

    Try to use an OracleCommand instead of an OleDb one. This will solve the issue.

    Wednesday, June 10, 2009 4:55 AM
  • User708331725 posted

    but why does oledb work in some cases and not in some....

    Wednesday, June 10, 2009 6:29 AM
  • User364663285 posted
    What did you change from the case that works?
    Wednesday, June 10, 2009 9:48 PM
  • User708331725 posted

    i've posted both codes, one which is working and the one which is throwing error. There is no diff in both codes. I really fail to understand why it throws error. Finally I changed all to OracleCommand and it worked.

    Thursday, June 11, 2009 1:21 AM
  • User364663285 posted
    So it's solved right?
    Thursday, June 11, 2009 3:10 AM
  • User708331725 posted

    yes with OracleCommand  this problem has been solved

    Thursday, June 11, 2009 3:38 AM
  • User-1597281272 posted

    UM i'm having the same problem and in my opinion OracleComand is NOT a solution but a workaround! has anyone actually got this to work with OleDbCommand as it should?

    Thursday, November 10, 2011 4:48 PM
  • User-854925005 posted

    I agree, the OleDbDataAdapter should work as advertised.  I just ran into this problem and was able to determine that the Fill method could not handle the NCLOB data type when using SQL command text.  When I move the identical SQL command to a stored procedure it works as expected.  Unfortunately, my enterprise connection string does not work with OracleConnection, so I cannot use the OracleCommand.  For now, I will remove the NCLOB from my select.

    Tuesday, November 29, 2011 12:16 PM