Bonjour,
j'ai un petit soucis d'appel de procédure stockée en VB.net.

j'ai donc une procédure stockée oracle dans laquelle j'ai un tableau de varchar en sortie.

Quand je l'appel en vb.net j'ai un soucis, en effet je ne sais pas comment déclarer le type de mon paramètre.

voici le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'Déclarations 
        Dim sProcedure As String
        Dim cmCommand1 As OleDb.OleDbCommand
        Dim dbResult As Integer
        Dim p0 As OleDb.OleDbParameter
        Dim p1 As OleDb.OleDbParameter
 
        'Instanciation et affectation
        cmCommand1 = New OleDb.OleDbCommand
        sProcedure = "MPF_BCL_PCK_SELECT.p_sel_vague_activ_sap"
        cmCommand1.CommandText = sProcedure
        cmCommand1.CommandType = CommandType.StoredProcedure
        cmCommand1.Connection = OLEcnx
 
        'paramètres de la procédure stockées
        p0 = New OleDb.OleDbParameter("vnvag", sNumeroVague)
        p1 = New OleDb.OleDbParameter("vactiv_sap", OleDb.OleDbType.Varchar, 200)
 
        p1.Direction = ParameterDirection.Output
 
        With cmCommand1.Parameters
            .Add(p0)
            .Add(p1)
        End With
 
        Try
            cmCommand1.ExecuteReader()
        Catch ex As OleDb.OleDbException
            Log.WriteLogErreur(ex.Message, ex.Source, "ClassORA@Get_Flg_ActivSAP_Vague")
        End Try
A l'exécution dans mon fichier log j'ai l'érreur suivante :

RUM35NT Source : Microsoft OLE DB Provider for Oracle - ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments
Quelqu'un a une idée??

Merci d'avance.