Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/06/2009, 19:56
Avatar de BlueSkull
BlueSkull
 
Fecha de Ingreso: noviembre-2008
Ubicación: Chile
Mensajes: 504
Antigüedad: 15 años, 6 meses
Puntos: 4
Cargar un dropdownlist con un procedimiento almacenado

Estimado, me gustaria poder cargar un drop mediante un procedimiento almacenado, tengo este codigo (ASP.NET-C#):

Drop:

Código PHP:
1. string sql2 "SELECT IDCRISTAL, CRISTAL FROM CRISTAL ORDER BY CRISTAL";
2. SqlDataAdapter da2 = new SqlDataAdapter(sql2con.get_conecction());
3. DataSet ds2 = new DataSet();
4. da2.Fill(ds2"CRISTAL");
5. this.ddl_cristal1.DataTextField ds2.Tables["CRISTAL"].Columns["CRISTAL"].ToString();
6. this.ddl_cristal1.DataValueField ds2.Tables["CRISTAL"].Columns["IDCRISTAL"].ToString();
7. this.ddl_cristal1.DataSource ds2.Tables["CRISTAL"];
8. this.ddl_cristal1.DataBind(); 
SP:

Código PHP:
1. CREATE PROCEDURE sp_ddl_cliente1( ) AS
2. BEGIN
3.    SELECT IDCRISTAL
CRISTAL FROM CRISTAL ORDER BY CRISTAL
4. END 
Como tendria que realizar la cargar del drop?.

Gracias.
__________________
"Incluso las torres más altas empiezan en el suelo."
"Sé Ágil..."
StreamWriter