View Single Post
  #6 (permalink)  
Old December 30th, 2007, 10:29 AM
jvanreck jvanreck is offline
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've tested it with Northwind database and an example program and it works.

But when I try to adapt the code to my program it still doesn't work.

Thank you very much for your response...


The full code is here:

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

<script runat="server">
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>GestiĆ³n COLENF</title>
  <link rel="StyleSheet" type="text/css" media="screen" />
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <div>
        <asp:GridView ID="GV_Colegiados" runat="server" DataSourceID="SDS_Colegiados"
          DataKeyNames="COLEGIADO"
          AllowSorting="True" AllowPaging="True" PagerSettings-Position="Top"
          EmptyDataText="No se han encontrado coincidencias"
          AutoGenerateColumns="False">
          <Columns>
            <asp:CommandField ShowEditButton="True" ShowSelectButton="True" />
            <asp:BoundField DataField="COLEGIADO" HeaderText="COLEGIADO" ReadOnly="True" SortExpression="COLEGIADO" />
            <asp:BoundField DataField="APELLIDOS" HeaderText="APELLIDOS" SortExpression="APELLIDOS" />
            <asp:BoundField DataField="NOMBRE" HeaderText="NOMBRE" SortExpression="NOMBRE" />
            <asp:CheckBoxField DataField="DEVOLUCION" HeaderText="DEVOLUCION" SortExpression="DEVOLUCION" />
            <asp:BoundField DataField="DIRECCION" HeaderText="DIRECCION" SortExpression="DIRECCION" />
            <asp:BoundField DataField="IUBICACION" HeaderText="IUBICACION" SortExpression="IUBICACION" />
            <asp:BoundField DataField="COMARCA" HeaderText="COMARCA" SortExpression="COMARCA" />
            <asp:BoundField DataField="POBLACION" HeaderText="POBLACION" SortExpression="POBLACION" />
            <asp:BoundField DataField="NCODPROV" HeaderText="NCODPROV" SortExpression="NCODPROV" />
            <asp:BoundField DataField="CODPOSTAL" HeaderText="CODPOSTAL" SortExpression="CODPOSTAL" />
            <asp:BoundField DataField="PAIS" HeaderText="PAIS" SortExpression="PAIS" />
            <asp:BoundField DataField="TELEFONO" HeaderText="TELEFONO" SortExpression="TELEFONO" />
            <asp:BoundField DataField="TELEFONO2" HeaderText="TELEFONO2" SortExpression="TELEFONO2" />
            <asp:BoundField DataField="CDNICIF" HeaderText="CDNICIF" SortExpression="CDNICIF" />
            <asp:BoundField DataField="TITULO 1" HeaderText="TITULO 1" SortExpression="TITULO 1" />
            <asp:BoundField DataField="TITULO 2" HeaderText="TITULO 2" SortExpression="TITULO 2" />
            <asp:BoundField DataField="FECHA DE NACIMIENTO" HeaderText="FECHA DE NACIMIENTO" SortExpression="FECHA DE NACIMIENTO" />
            <asp:BoundField DataField="SEXO" HeaderText="SEXO" SortExpression="SEXO" />
            <asp:BoundField DataField="E-MAIL" HeaderText="E-MAIL" SortExpression="E-MAIL" />
            <asp:CheckBoxField DataField="MOROSO" HeaderText="MOROSO" SortExpression="MOROSO" />
            <asp:BoundField DataField="SALDO" HeaderText="SALDO" SortExpression="SALDO" />
          </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SDS_Colegiados" runat="server" ConnectionString="<%$ ConnectionStrings:ACS_Colegiados %>"
          ProviderName="<%$ ConnectionStrings:ACS_Colegiados.ProviderName %>"
          SelectCommand="SELECT * FROM [Colegiados]"
          UpdateCommand="UPDATE [Colegiados] SET [Nombre]=@Nombre, [Apellidos]=@Apellidos, [CDNICIF]=@CDNICIF, [Direccion]=@Direccion WHERE [COLEGIADO]=@COLEGIADO ">
        </asp:SqlDataSource>
      </div>
    </div>
  </form>
</body>
</html>
:)