Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/04/2009, 16:36
Trulala de cordoba
 
Fecha de Ingreso: octubre-2000
Mensajes: 1.692
Antigüedad: 24 años, 5 meses
Puntos: 19
Respuesta: Llenar TextBox de un Store Procedure (DataSet)

Mas o menos podrías hacer así:
Código:
SqlCommand myCommand = new SqlCommand("dbo.MyStoredProcedure");
myCommand.CommandType = CommandType.StoredProcedure;

// create SqlConnection
SqlConnection myConnection = new SqlConnection("your connection string
here");
myCommand.Connection = myConnection;
SqlDataAdapter da = new SqlDataAdapter(myCommand);

DataSet data = new DataSet();
da.Fill(data);


foreach(DataRow Row in Data.Tables[0].Rows)
{
txtNombre.Text = Row.cells["Nombre"].value.ToString();
}
__________________
PD: Con amor, fe, amor a Dios y amistad podemos hacer un mundo mejor!!!!