 
			
				24/09/2008, 13:59
			
			
			     |  
        |     |    |    Fecha de Ingreso: julio-2006  
						Mensajes: 15
					  Antigüedad: 19 años, 3 meses Puntos: 0     |        |  
  |      Visualizar Tablas SQL con parametro de entrada        Hola Gente: 
Hace un tiempo que estoy incursionando en el tema de asp.net y sql y me surgió el siguiente problemòn.  Extraje de la Web ejemplos como el sig. pero necesito invocar y modificar varias tablas a la vez en lugar de una sola como en el ejemplo,  y por si esto fuera poco........NECESITO ENVIARLE EL ID DE UNA PERSONA desde un Web Form previo (por GET), tipo asi:   
  DataNavigateUrlFormatString="3g.ASPX?id={0}   
Para que el GridView me devuelva los datos de una persona a consultar (y no todas las personas).   
Aca les mando el código que desearia modificar. 
Desde ya muchas Gracias.   
<%@Page  Language="VB" %> 
<%@Import Namespace="System.Web.Mail" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
<script runat="server">   
 Sub OnDSUpdatedHandler(ByVal source As Object, ByVal e As SqlDataSourceStatusEventArgs) 
    If e.AffectedRows > 0 Then 
        ' Perform any additional processing,  
        ' such as setting a status label after the operation.         
        Label1.Text = Request.LogonUserIdentity.Name & _ 
            " changed user information successfully!" 
    Else  
        Label1.Text = "No data updated!" 
    End If 
 End Sub 'OnDSUpdatedHandler 
</script>   
<html> 
  <head id="Head1" runat="server"> 
    <title>ASP.NET Example</title> 
</head> 
<body> 
    <form id="form1" runat="server">   
      <asp:SqlDataSource 
          id="SqlDataSource1" 
          runat="server" 
          DataSourceMode="DataSet" 
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>" 
          SelectCommand="SELECT EmployeeID,FirstName,LastName,Title FROM Employees" 
          UpdateCommand="Update Employees SET FirstName=@FirstName,LastName=@LastName,Title=@Tit  le WHERE EmployeeID=@EmployeeID" 
          OnUpdated="OnDSUpdatedHandler"> 
      </asp:SqlDataSource>   
      <asp:GridView 
          id="GridView1" 
          runat="server" 
          AutoGenerateColumns="False" 
          DataKeyNames="EmployeeID" 
          AutoGenerateEditButton="True" 
          DataSourceID="SqlDataSource1"> 
          <columns> 
              <asp:BoundField HeaderText="First Name" DataField="FirstName" /> 
              <asp:BoundField HeaderText="Last Name" DataField="LastName" /> 
              <asp:BoundField HeaderText="Title" DataField="Title" /> 
          </columns> 
      </asp:GridView>   
      <asp:Label 
          id="Label1" 
          runat="server"> 
      </asp:Label>   
    </form>           |