Bonjour à tous,

Je butte avec la commande ds.Select() de SqlDataSource, au débogage, j'ai l'erreur
Aucune surcharge pour la méthode 'Select' ne prend d'arguments 0....
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
 
using System.Data;
using System.Data.Common;
using System.Data.Sql;
using System.Data.SqlClient;
...
 
SqlConnection conn = new SqlConnection("csTestDB2");
conn.Open();
 
SqlDataSource ds = new SqlDataSource();
 
ds.SelectCommand = "usp_ListeDINonRecue";
ds.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
 
ds.SelectParameters.Add("@sEmploye_Id", TypeCode.Int16, sEmploye_Id);
ds.SelectParameters.Add("@sTypeEmploye", TypeCode.Int16, sTypeEmploye);
ds.Select();
conn.Close(DataSourceSelectArguments.Empty);
Sur TSQL, ma ps fonctionne sans problème.
Avez-vous une idée? Que dois-je mettre comme arguments?

Merci d'avance de votre aide.