Unspecified error oledbexception RRS feed

  • Question

  • Hi,
     I have oracle 8 and I want to call the stored procedure. I have two parameters as input type. when I execute

    oledbcommand.executeNonQuery I get "Unspecified error" Oledbexception. However, when I use the same code with oracleclient.oraclecommand.executeNonQuery, it passes off nicely. Any suggestions on this behaviour. We have to use OleDB and I cannot use OracleClient.

    Please help in this regard.

    Noorul Ahmed
    Tuesday, January 29, 2008 1:14 PM

All replies

  • Could you post a sample of your code so we can see how you are calling the stored procedure (include creation of Command object and parameters)?

    Tuesday, January 29, 2008 1:33 PM
  • Code Snippet
    connection = New OleDbConnection(Provider=OraOLEDB.Oracle; Data Source=databaseName; User ID=user;Password=password;)

    Dim smsParam1, smsParam2 As New OleDbParameter
                        smsParam1.ParameterName = "V_MOBILENO"
                        smsParam2.ParameterName = "V_SMS_TEXT"
                        smsParam1.OleDbType = OleDbType.VarChar
                        smsParam2.OleDbType = OleDbType.VarChar
                        smsParam1.Direction = ParameterDirection.Input
                        smsParam2.Direction = ParameterDirection.Input

     cmdSendSMS = New OleDbCommand("Stored_Proc", connection)
                            cmdSendSMS.CommandType = CommandType.StoredProcedure

                                smsParam1.Value = "00966555455434" 'A mobile number
                                smsParam2.Value = "Test SMS Message"  'An sms message


    for oracle client, i remove provider, change oledb to oracle prefix.


    Wednesday, January 30, 2008 10:41 AM
  • You probably need to specify the Size property for any text parameters (which would just be the length of your parameter values). That would be the easy fix so I would try that first.


    Wednesday, January 30, 2008 2:41 PM
  • Hi,

      I tried that, but it gives me same error. The procedure I am trying to execute is a link to another procedure in another database. I created another procedure in the db and it worked fine with oledb, so I think it is about calling the procedure link.



    Wednesday, January 30, 2008 5:17 PM