bonjour,

je cherche à l'aide d'une procédure stockée d'inserer des données dans ma table appels voici ma procéduré stockée:
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
 
ALTER PROCEDURE dbo.SP_INSERT_APPEL
 
	(
	   @A_ETAT char(10),
	   @A_URGENCE char(1),
	   @A_IMPACT char(10),
	   @A_PRIORITE char(10),
	   @A_CREATEUR char(15),
	   @A_DATECREATION DateTime,
	   @A_VECTEURAPPEL char(10),
	   @A_PRODUITCODE char(10),
	   @A_PRODUITLIB char(20),
	   @A_VERSION char(10),
	   @A_EVALUATION char(1),
	   @A_CONTRATCODE char(10),
	   @A_SOCIETECODE char(10),
	   @A_SOCIETELIB char(20),
	   @A_PARTENAIRE char(1),
	   @A_INTERLCODE char(10),
	   @A_INTERLLIB char(20),
	   @A_INTERLTEL char(24),
	   @A_INTERLMAIL char(24),
	   @A_DESCRIPTION char(254)
	   	)
 
AS
    DECLARE @A_NUMEROAPPEL int; 
 
	SET @A_NUMEROAPPEL = (SELECT NextId from IDS where TableName='APPELS');
	UPDATE IDS SET NextId=@A_NUMEROAPPEL+1 where TableName='APPELS';
 
	INSERT INTO APPELS (A_NUMEROAPPEL,A_ETAT,A_URGENCE,A_IMPACT,A_PRIORITE,A_CREATEUR,A_CREATEUR,A_DATECREATION,A_VECTEURAPPEL,A_PRODUITCODE,A_PRODUITLIB,A_VERSION,A_EVALUATION,A_CONTRATCODE,A_SOCIETECODE,A_SOCIETELIB,A_PARTENAIRE,A_INTERLCODE,A_INTERLLIB,A_INTERLTEL,A_INTERLMAIL,A_DESCRIPTION)
	   VALUES (@A_NUMEROAPPEL ,@A_ETAT,@A_URGENCE,@A_IMPACT,@A_PRIORITE,@A_CREATEUR,@A_CREATEUR,@A_DATECREATION,@A_VECTEURAPPEL,@A_PRODUITCODE,@A_PRODUITLIB,@A_VERSION,@A_EVALUATION,@A_CONTRATCODE,@A_SOCIETECODE,@A_SOCIETELIB,@A_PARTENAIRE,@A_INTERLCODE,@A_INTERLLIB,@A_INTERLTEL,@A_INTERLMAIL,@A_DESCRIPTION)  
 
	   	RETURN  @@IDENTITY
j'aimerai inserer les données par un detailsview ou formview. par formview je n'arrive même pas à configurer ma source de données.
par un detailsview voici l'erreur que j'obtiens en éxecution:




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
 
 
Erreur du serveur dans l'application '/insert'. 
 
Trop d'arguments sont spécifiés pour la procédure ou la fonction SP_INSERT_APPEL. 
Description : Une exception non gérée s'est produite au moment de l'exécution de la demande Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code. 
 
Détails de l'exception: System.Data.SqlClient.SqlException: Trop d'arguments sont spécifiés pour la procédure ou la fonction SP_INSERT_APPEL.
 
Erreur source: 
Une exception non gérée s'est produite lors de l'exécution de la demande Web actuelle. Les informations relatives à l'origine et l'emplacement de l'exception peuvent être identifiées en utilisant la trace de la pile d'exception ci-dessous. 
 
Trace de la pile: 
 
[SqlException (0x80131904): Trop d'arguments sont spécifiés pour la procédure ou la fonction SP_INSERT_APPEL.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2305
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +147
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1021
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +413
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +392
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +405
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +68
   System.Web.UI.WebControls.DetailsView.HandleInsert(String commandArg, Boolean causesValidation) +391
   System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +609
   System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source, EventArgs e) +87
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source, EventArgs e) +109
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +86
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919