begin process at 2012 05 28 03:40:48
  Trouver un code source :
 
dans
 
Accueil > Forum > 

ASP.NET

 > 

Base de données

 > 

Access

 > 

PROBLEME DE MISE A JOUR AVEC FORMVIEW


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

PROBLEME DE MISE A JOUR AVEC FORMVIEW

mardi 11 mars 2008 à 21:52:48 | PROBLEME DE MISE A JOUR AVEC FORMVIEW

simo5266

Bonsoir tt le monde,

Je développe avec VS.NET 2005 une application WEB et j'ai un probleme de mise a jour(modification ou bien la suppression) avec le controle FORMVIEW c'est quand j'utilise la table liste_personnel mais quad j'utilise autres aucun probleme c'est vraiment bizzard
voila le code :

<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="administration.aspx.cs"Inherits="administration" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns ="http://www.w3.org/1999/xhtml" >

<

head runat ="server">

< title > DGP : ADMINISTRATION </ title >

</

head >

<

body >

< form id ="form1" runat ="server">

< div >< center >

< asp : Label ID ="Label1" runat ="server" Font-Bold ="True" Font-Italic ="True" Font-Size ="XX-Large"

Font-Strikeout ="False" Font-Underline ="True" ForeColor ="BurlyWood" Text ="ADMINISTRATION"></ asp : Label > &nbsp; </ center >

< center >

&nbsp; </ center >

< center >

&nbsp; </ center >

< center >

&nbsp; </ center >

< center >

&nbsp; </ center >

< center >

&nbsp;

< asp : Label ID ="Label3" runat ="server" Text ="PAR NOM :" Font-Bold ="True" ForeColor ="Peru" Width ="103px"></ asp : Label >

< asp : TextBox ID ="TextBox2" runat ="server"></ asp : TextBox >

< asp : Button ID ="Button1" runat ="server" OnClick ="Button1_Click" Text ="Search" /></ center >

< center >

&nbsp; </ center >

< center >

&nbsp; &nbsp;&nbsp; </ center >

< center >

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; < asp : FormView ID ="FormView1" runat ="server" DataKeyNames ="MLE_PPR"

DataSourceID ="SqlDataSource1" BackColor ="#DEBA84" BorderColor ="#DEBA84" BorderStyle ="None" BorderWidth ="1px" CellPadding ="3" CellSpacing ="2" GridLines ="Both" HorizontalAlign ="Center" Width ="489px" Font-Bold ="True" Font-Italic ="False">

< EditItemTemplate >

MLE_PPR:

< asp : Label ID ="MLE_PPRLabel1" runat ="server" Text =' <%# Eval("MLE_PPR") %> '></ asp : Label >< br />

NOM_ PRENOM:

< asp : TextBox ID ="NOM__PRENOMTextBox" runat ="server" Text =' <%# Bind("[NOM_ PRENOM]") %> '>

</ asp : TextBox >< br />

CIN:

< asp : TextBox ID ="CINTextBox" runat ="server" Text =' <%# Bind("CIN") %> '>

</ asp : TextBox >< br />

NAISSANCE:

< asp : TextBox ID ="NAISSANCETextBox" runat ="server" Text =' <%# Bind("NAISSANCE") %> '>

</ asp : TextBox >< br />

AFFECTATION:

< asp : TextBox ID ="AFFECTATIONTextBox" runat ="server" Text =' <%# Bind("AFFECTATION") %> '>

</ asp : TextBox >< br />

ECHELLE:

< asp : TextBox ID ="ECHELLETextBox" runat ="server" Text =' <%# Bind("ECHELLE") %> '>

</ asp : TextBox >< br />

ECHELON:

< asp : TextBox ID ="ECHELONTextBox" runat ="server" Text =' <%# Bind("ECHELON") %> '>

</ asp : TextBox >< br />

CATEGORIE:

< asp : TextBox ID ="CATEGORIETextBox" runat ="server" Text =' <%# Bind("CATEGORIE") %> '>

</ asp : TextBox >< br />

FONCTION:

< asp : TextBox ID ="FONCTIONTextBox" runat ="server" Text =' <%# Bind("FONCTION") %> '>

</ asp : TextBox >< br />

ANCADMIN:

< asp : TextBox ID ="ANCADMINTextBox" runat ="server" Text =' <%# Bind("ANCADMIN") %> '>

</ asp : TextBox >< br />

N_AFFIL-CRM:

< asp : TextBox ID ="N_AFFIL_CRMTextBox" runat ="server" Text =' <%# Bind("[N_AFFIL-CRM]") %> '>

</ asp : TextBox >< br />

< asp : LinkButton ID ="UpdateButton" runat ="server" CausesValidation ="True" CommandName ="Update"

Text ="Update">

</ asp : LinkButton >

< asp : LinkButton ID ="UpdateCancelButton" runat ="server" CausesValidation ="False" CommandName ="Cancel"

Text ="Cancel">

</ asp : LinkButton >

</ EditItemTemplate >

< InsertItemTemplate >

MLE_PPR:

< asp : TextBox ID ="MLE_PPRTextBox" runat ="server" Text =' <%# Bind("MLE_PPR") %> '>

</ asp : TextBox >< br />

NOM_ PRENOM:

< asp : TextBox ID ="NOM__PRENOMTextBox" runat ="server" Text =' <%# Bind("[NOM_ PRENOM]") %> '>

</ asp : TextBox >< br />

CIN:

< asp : TextBox ID ="CINTextBox" runat ="server" Text =' <%# Bind("CIN") %> '>

</ asp : TextBox >< br />

NAISSANCE:

< asp : TextBox ID ="NAISSANCETextBox" runat ="server" Text =' <%# Bind("NAISSANCE") %> '>

</ asp : TextBox >< br />

AFFECTATION:

< asp : TextBox ID ="AFFECTATIONTextBox" runat ="server" Text =' <%# Bind("AFFECTATION") %> '>

</ asp : TextBox >< br />

ECHELLE:

< asp : TextBox ID ="ECHELLETextBox" runat ="server" Text =' <%# Bind("ECHELLE") %> '>

</ asp : TextBox >< br />

ECHELON:

< asp : TextBox ID ="ECHELONTextBox" runat ="server" Text =' <%# Bind("ECHELON") %> '>

</ asp : TextBox >< br />

CATEGORIE:

< asp : TextBox ID ="CATEGORIETextBox" runat ="server" Text =' <%# Bind("CATEGORIE") %> '>

</ asp : TextBox >< br />

FONCTION:

< asp : TextBox ID ="FONCTIONTextBox" runat ="server" Text =' <%# Bind("FONCTION") %> '>

</ asp : TextBox >< br />

ANCADMIN:

< asp : TextBox ID ="ANCADMINTextBox" runat ="server" Text =' <%# Bind("ANCADMIN") %> '>

</ asp : TextBox >< br />

N_AFFIL-CRM:

< asp : TextBox ID ="N_AFFIL_CRMTextBox" runat ="server" Text =' <%# Bind("[N_AFFIL-CRM]") %> '>

</ asp : TextBox >< br />

< asp : LinkButton ID ="InsertButton" runat ="server" CausesValidation ="True" CommandName ="Insert"

Text ="Insert">

</ asp : LinkButton >

< asp : LinkButton ID ="InsertCancelButton" runat ="server" CausesValidation ="False" CommandName ="Cancel"

Text ="Cancel">

</ asp : LinkButton >

</ InsertItemTemplate >

< ItemTemplate >

MLE_PPR:

< asp : Label ID ="MLE_PPRLabel" runat ="server" Text =' <%# Eval("MLE_PPR") %> '></ asp : Label >< br />

NOM_ PRENOM:

< asp : Label ID ="NOM__PRENOMLabel" runat ="server" Text =' <%# Bind("[NOM_ PRENOM]") %> '>

</ asp : Label >< br />

CIN:

< asp : Label ID ="CINLabel" runat ="server" Text =' <%# Bind("CIN") %> '></ asp : Label >< br />

NOM_ARABE:

< asp : Label ID ="NOM_ARABELabel" runat ="server" Text =' <%# Bind("NOM_ARABE") %> '></ asp : Label >< br />

NAISSANCE:

< asp : Label ID ="NAISSANCELabel" runat ="server" Text =' <%# Bind("NAISSANCE") %> '></ asp : Label >< br />

AFFECTATION:

< asp : Label ID ="AFFECTATIONLabel" runat ="server" Text =' <%# Bind("AFFECTATION") %> '>

</ asp : Label >< br />

ECHELLE:

< asp : Label ID ="ECHELLELabel" runat ="server" Text =' <%# Bind("ECHELLE") %> '></ asp : Label >< br />

ECHELON:

< asp : Label ID ="ECHELONLabel" runat ="server" Text =' <%# Bind("ECHELON") %> '></ asp : Label >< br />

CATEGORIE:

< asp : Label ID ="CATEGORIELabel" runat ="server" Text =' <%# Bind("CATEGORIE") %> '></ asp : Label >< br />

FONCTION:

< asp : Label ID ="FONCTIONLabel" runat ="server" Text =' <%# Bind("FONCTION") %> '></ asp : Label >< br />

ANCADMIN:

< asp : Label ID ="ANCADMINLabel" runat ="server" Text =' <%# Bind("ANCADMIN") %> '></ asp : Label >< br />

N_AFFIL-CRM:

< asp : Label ID ="N_AFFIL_CRMLabel" runat ="server" Text =' <%# Bind("[N_AFFIL-CRM]") %> '>

</ asp : Label >< br />

< asp : LinkButton ID ="EditButton" runat ="server" CausesValidation ="False" CommandName ="Edit"

Text ="Edit">

</ asp : LinkButton >

< asp : LinkButton ID ="DeleteButton" runat ="server" CausesValidation ="False" CommandName ="Delete"

Text ="Delete">

</ asp : LinkButton >

< asp : LinkButton ID ="NewButton" runat ="server" CausesValidation ="False" CommandName ="New"

Text ="New">

</ asp : LinkButton >

</ ItemTemplate >

< FooterStyle BackColor ="#F7DFB5" ForeColor ="#8C4510" />

< EditRowStyle BackColor ="#738A9C" Font-Bold ="True" ForeColor ="White" />

< RowStyle BackColor ="#FFF7E7" ForeColor ="#8C4510" />

< PagerStyle ForeColor ="#8C4510" HorizontalAlign ="Center" />

< HeaderStyle BackColor ="#A55129" Font-Bold ="True" ForeColor ="White" />

</ asp : FormView >

</ center >

</ div >

&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

< asp : SqlDataSource ID ="SqlDataSource1" runat ="server" CancelSelectOnNullParameter ="False"

ConflictDetection ="CompareAllValues" ConnectionString =" <%$ ConnectionStrings:ConnectionString %> "

DeleteCommand ="DELETE FROM [LISTE_PERSONNEL] WHERE [MLE_PPR] = ? AND [NOM_ PRENOM] = ? AND [CIN] = ? AND [NOM_ARABE] = ? AND [NAISSANCE] = ? AND [AFFECTATION] = ? AND [ECHELLE] = ? AND [ECHELON] = ? AND [CATEGORIE] = ? AND [FONCTION] = ? AND [ANCADMIN] = ? AND [N_AFFIL-CRM] = ?"

InsertCommand ="INSERT INTO [LISTE_PERSONNEL] ([MLE_PPR], [NOM_ PRENOM], [CIN], [NOM_ARABE], [NAISSANCE], [AFFECTATION], [ECHELLE], [ECHELON], [CATEGORIE], [FONCTION], [ANCADMIN], [N_AFFIL-CRM]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"

OldValuesParameterFormatString ="original_{0}" ProviderName =" <%$ ConnectionStrings:ConnectionString.ProviderName %> "

SelectCommand ="SELECT * FROM [LISTE_PERSONNEL] WHERE ([NOM_ PRENOM] LIKE '%' + ? + '%')" UpdateCommand ="UPDATE [LISTE_PERSONNEL] SET [NOM_ PRENOM] = ?, [CIN] = ?, [NOM_ARABE] = ?, [NAISSANCE] = ?, [AFFECTATION] = ?, [ECHELLE] = ?, [ECHELON] = ?, [CATEGORIE] = ?, [FONCTION] = ?, [ANCADMIN] = ?, [N_AFFIL-CRM] = ? WHERE [MLE_PPR] = ? AND [NOM_ PRENOM] = ? AND [CIN] = ? AND [NOM_ARABE] = ? AND [NAISSANCE] = ? AND [AFFECTATION] = ? AND [ECHELLE] = ? AND [ECHELON] = ? AND [CATEGORIE] = ? AND [FONCTION] = ? AND [ANCADMIN] = ? AND [N_AFFIL-CRM] = ?">

< DeleteParameters >

< asp : Parameter Name ="original_MLE_PPR" Type ="Double" />

< asp : Parameter Name ="original_NOM_PRENOM" Type ="String" />

< asp : Parameter Name ="original_CIN" Type ="String" />

< asp : Parameter Name ="original_NOM_ARABE" Type ="String" />

< asp : Parameter Name ="original_NAISSANCE" Type ="String" />

< asp : Parameter Name ="original_AFFECTATION" Type ="String" />

< asp : Parameter Name ="original_ECHELLE" Type ="String" />

< asp : Parameter Name ="original_ECHELON" Type ="String" />

< asp : Parameter Name ="original_CATEGORIE" Type ="String" />

< asp : Parameter Name ="original_FONCTION" Type ="String" />

< asp : Parameter Name ="original_ANCADMIN" Type ="String" />

< asp : Parameter Name ="original_column1" Type ="String" />

</ DeleteParameters >

< UpdateParameters >

< asp : Parameter Name ="NOM_PRENOM" Type ="String" />

< asp : Parameter Name ="CIN" Type ="String" />

< asp : Parameter Name ="NAISSANCE" Type ="String" />

< asp : Parameter Name ="AFFECTATION" Type ="String" />

< asp : Parameter Name ="ECHELLE" Type ="String" />

< asp : Parameter Name ="ECHELON" Type ="String" />

< asp : Parameter Name ="CATEGORIE" Type ="String" />

< asp : Parameter Name ="FONCTION" Type ="String" />

< asp : Parameter Name ="ANCADMIN" Type ="String" />

< asp : Parameter Name ="column1" Type ="String" />

< asp : Parameter Name ="original_MLE_PPR" Type ="Double" />

< asp : Parameter Name ="original_NOM_PRENOM" Type ="String" />

< asp : Parameter Name ="original_CIN" Type ="String" />

< asp : Parameter Name ="original_NOM_ARABE" Type ="String" />

< asp : Parameter Name ="original_NAISSANCE" Type ="String" />

< asp : Parameter Name ="original_AFFECTATION" Type ="String" />

< asp : Parameter Name ="original_ECHELLE" Type ="String" />

< asp : Parameter Name ="original_ECHELON" Type ="String" />

< asp : Parameter Name ="original_CATEGORIE" Type ="String" />

< asp : Parameter Name ="original_FONCTION" Type ="String" />

< asp : Parameter Name ="original_ANCADMIN" Type ="String" />

< asp : Parameter Name ="original_column1" Type ="String" />

</ UpdateParameters >

< InsertParameters >

< asp : Parameter Name ="MLE_PPR" Type ="Double" />

< asp : Parameter Name ="NOM_PRENOM" Type ="String" />

< asp : Parameter Name ="CIN" Type ="String" />

< asp : Parameter Name ="NOM_ARABE" Type ="String" />

< asp : Parameter Name ="NAISSANCE" Type ="String" />

< asp : Parameter Name ="AFFECTATION" Type ="String" />

< asp : Parameter Name ="ECHELLE" Type ="String" />

< asp : Parameter Name ="ECHELON" Type ="String" />

< asp : Parameter Name ="CATEGORIE" Type ="String" />

< asp : Parameter Name ="FONCTION" Type ="String" />

< asp : Parameter Name ="ANCADMIN" Type ="String" />

< asp : Parameter Name ="column1" Type ="String" />

</ InsertParameters >

< SelectParameters >

< asp : ControlParameter ControlID ="TextBox2" Name ="NOM_PRENOM" PropertyName ="Text"

Type ="String" />

</ SelectParameters >

</ asp : SqlDataSource >

&nbsp;

</ form >

</

body >

</

html >
mardi 11 mars 2008 à 23:36:37 | Re : PROBLEME DE MISE A JOUR AVEC FORMVIEW

jesusonline

Membre Club Administrateur CodeS-SourceS
Bonjour,

aurais tu un message d'erreur ou quelque chose qui puisse nous avancer ? car donner son code en pature en attendant que quelqu'un le debug n'est pas forcément la meilleure solution ... :)


Cyril - MSP - MCPD ASP.net & MCTS SQL - Consultant indépendant
mercredi 12 mars 2008 à 00:19:36 | Re : PROBLEME DE MISE A JOUR AVEC FORMVIEW

simo5266

rebonsoir,

merci d'abord de me repondre

voila l'erreur qui s'affiche :

"L'opération doit utiliser une requête qui peut être mise à jour"

j'ai vérifié les droits sur le dossier et tt mais toujours ca ne marche pas   


Cette discussion est classée dans : asp, server, runat, id, name


Répondre à ce message

Sujets en rapport avec ce message

Datagrid qui me rend fou [ par MOOKIES ] Salut,bon je vais essyer d'être clair. J'EN ES MARRE sa marche pas, là rien d'original. En fait je veut utiliser la commande Delete d'un Datagrid (bas Calcul de l'âge dans un datalist [ par Alain37Mtl ] Mon application web affiche la liste des membres et je voudrais afficher l'âge de chacun au lieu de leur date de naissance. Protected <FONT color=#000 Problème avec RequiredFieldValidator [ par richardjul ] Bonjour,j'ai un problème avec mon RequiredFieldValidator, je suis un peu novice en VB.Net mais j'essaie tant bien que mal!Mon soucis est le suivant, d update dans formview + sqldatasource [ par jimmy28 ] Salut à tous,Voilà, ca fait des semaines que je cherche désespérément pourquoi mon UPDATE ne fonctionne pas.Je travaille en asp.net 2.0 et VB.net s dataList imbriqués [ par obelix789 ] Bonjour à tous. Un petit problème m'amène à vous consulter. J'utilise 2 datalist imbriqués avec une condition sur la valeur d'un champ pour le deuxièm Problème avec un tchat [ par zebabar ] Bonjour,j'essaie de programmer un tchat en asp.net en utilisant des UpdatePanel. Ca marche nickel mais je ne parviens pas à gérer le scroll pour affic Deux repeater Imbriqué [ par Gkarima ] Bonjour J'ai un petit problème c'est que j'ai deux repeater imbriqué  le premie m'apporte les Auteurs et le deuxieme , il m'apporte les livres de chaq passage de d'un param entre deux DDL [ par 76julien ] Bonjour tout le monde !!Je cherche a faire passer un paramètre entre deux DropDownList qui se trouve sur la meme page...Concrétement, le principe est Aide pour le Calendar Ajax [ par vinzemuls ] Bonjour, j'ai installé AJAX toolkit.J'ai ajouté sur mon site le toolkitscriptmanager + calendarextender + une boite de texte.J'ai mis la propriété Tar [ASP.NET]wssuc récupérer le title [ par fred02 ] Bonjour,J'ai un soucis pour récupérer la valeur du titre du composant wssuc:InputFormSec


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 1,357 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales