1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Dim Connection As OracleConnection = New OracleConnection
Dim ObjetCommand As OracleCommand
Dim ObjetDataAdapter As OracleDataAdapter = New OracleDataAdapter
Dim cursor As OracleRefCursor
Dim tableau(20) As String
Try
Connection.ConnectionString = System.Configuration.ConfigurationManager.AppSettings.Item("connectionstring")
Connection.Open()
ObjetCommand = New OracleCommand("PKG_ALL_LOG.PRC_GET_LOG_LAST_COMMANDE", Connection)
ObjetCommand.Parameters.Add(New OracleParameter("pcoutCommande", OracleDbType.RefCursor)).Direction = ParameterDirection.Output
ObjetCommand.CommandType = CommandType.StoredProcedure
ObjetCommand.Connection = Connection
ObjetCommand.ExecuteNonQuery()
If Not ObjetCommand.Parameters.Item("pcoutCommande") Is Nothing Then
cursor = ObjetCommand.Parameters.Item(0).Value
End If
Finally
Connection.Close()
End Try |
Partager