Using dbms_output.get_line in VB.NET

后端 未结 3 1124
心在旅途
心在旅途 2021-01-29 03:47

I have some stored procedures to execute that use dbms_output.put_line() to put data into the output buffer.

I know I need to use dbms_output.get_line

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-29 04:07

    In vb.net the code format SKINDER friend is as follows... thnxs for sharing

    Sub _showDbms() 
                Dim c As New OracleCommand()
                c.Connection = frmMain._cnn
                With c
                    .CommandType = CommandType.Text
                    .CommandText = "begin dbms_output.get_line(:line, :status); end;"
                    .Parameters.Add(New OracleParameter("line", OracleDbType.Varchar2)).Size = 32000
                    .Parameters("line").Direction = ParameterDirection.Output
                    .Parameters.Add(New OracleParameter("status", OracleDbType.Int32))
                    .Parameters("status").Direction = ParameterDirection.Output
                End With
                c.ExecuteNonQuery()
                If c.Parameters("line").Value IsNot DBNull.Value Then
                    MsgBox(c.Parameters("line").Value.ToString)
                End If
        End Sub 
    

提交回复
热议问题