title: Using dbms_output.get_line in VB.NET
body: <p>I have some stored procedures to execute that use <code>dbms_output.put_line()</code> to put data into the output buffer.</p>
  
  <p>I know I need to use <code>dbms_output.get_line(:line, :status)</code> to retrieve that output.
  I'm using <code>System.Data.OracleClient</code> to avoid headaches with Oracle deployment.</p>
  
  <p>So what am I doing wrong with the code below?</p>
  
  <pre><code>Dim cmdSproc As OracleCommand = cnOracle.CreateCommand()
  Dim strOracle As New OracleString()
  Dim opaLine As New OracleParameter("lineOut", OracleType.VarChar, 255)
  opaLine.Direction = ParameterDirection.Output
  Dim opaStatus As New OracleParameter("status", 0)
  cmdSproc.CommandText = "begin dbms_output.get_line(:lineOut,:status); end;"
  cmdSproc.Parameters.Add(opaLine)
  cmdSproc.Parameters.Add(opaStatus)
  
  Dim strOutput As String = ""
  strOracle = "0"
  Try
     While strOracle = "0"
        cmdSproc.ExecuteOracleNonQuery(strOracle)
        strOutput = strOutput &amp; strOracle.ToString() &amp; vbNewLine
     End While
  Catch ex As Exception
     MsgBox(ex.Message)
  End Try
  </code></pre>