Bonjour
J'utilise une procédure stockée pour remplir un gridview
ma procédure est la suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 CREATE OR REPLACE PROCEDURE COM02.GET_EMPLOYES_CARTES (p_recordset1 OUT SYS_REFCURSOR, id_niveau IN INTEGER) AS BEGIN OPEN p_recordset1 FOR select ......; END GET_EMPLOYES_CARTES;
mon code d'appel de la procédure est le suivant:
l'appel de la classe est le suivant (dans la page qui contient me gridview)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 Imports Microsoft.VisualBasic Imports System.Data Imports System.Data.OracleClient Public Class Class1 Dim vNiveau As Integer Public WriteOnly Property id_niveau() As Integer Set(ByVal value As Integer) vNiveau = value End Set End Property Public Function GetData() As Data.DataTable Dim connectionString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString Dim conn As OracleConnection conn = New OracleConnection(connectionString) Dim cmd As New OracleClient.OracleCommand() cmd.CommandText = "GET_EMPLOYES_CARTES" cmd.Connection = conn cmd.CommandType = CommandType.StoredProcedure Dim id_niveau As OracleParameter = New OracleParameter id_niveau.OracleType = OracleType.Number id_niveau.Direction = ParameterDirection.Input id_niveau.Value = vNiveau cmd.Parameters.Add(id_niveau) cmd.Parameters.Add("p_recordset1", OracleType.Cursor).Direction = ParameterDirection.Output Dim OrclDA As New OracleDataAdapter(cmd) Dim RtnTable As New DataTable conn.Open() OrclDA.Fill(RtnTable) conn.Close() Return RtnTable End Function End Class
l’erreur est la suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Dim pp As New Class1 pp.id_niveau = 2 Dim Dv As New DataView(pp.GetData) GridView1.DataSource = Dv GridView1.DataBind()
QQ a une idée sur la solution?ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GET_EMPLOYES_CARTES' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Partager