0 Replies Latest reply: Apr 9, 2012 4:12 PM by 897979 RSS

    Running procedures through ODBC

    897979
      I have a powershell script I run that updates a database with a script intiially used with an OCI based application we developed, the scritp includes several statements and is delimted with begining and ending makres that the OCI devel uses to loop through and execute sequentially.

      When I use code like:

      $DBConnection=New-Object System.Data.Odbc.OdbcConnection
      $DBCommand=New-Object System.Data.Odbc.OdbcCommand
      $DBConnection.ConnectionString=$ConnectionString
      $DBConnection.Open()
      $DBCommand.Connection=$DBConnection
      $DBCommand.CommandText=$DBStatement
      $DBResult=$DBCommand.ExecuteNonQuery()

      So when the connection string is populated and the statement is executed for each loop, it eventually errors out after several.

      I assume there is some way for me to enable debugging on the Oracle side (11gr2) to see what exactly was not accepted, can anyone shed some light?

      Thanks!