Ver Mensaje Individual
  #1  
Antiguo 07-05-2007
Stilgar Stilgar is offline
Miembro
 
Registrado: may 2007
Posts: 21
Reputación: 0
Stilgar Va por buen camino
Problemilla con consulta con ORAStoredProc

Buenas a tod@s, tengo un pequeño problema y espero que me puedan ayudar.
Estoy haciendo una consulta a un campo utilizando un ORAStoredProc. La idea es crear un RadioButton por cada registro que encuentre en el campo buscado.

Hago algo de este estilo:

Código Delphi [-] OraStoredProc1.Close; OraStoredProc1.SQL.Add('SELECT DEFINICION FROM CUOTAS'); OraStoredProc1.Execute; OraDataSource1.DataSet := OraStoredProc1; DBGrid1.Datasource := OraDataSource1; numkc := OraStoredProc1.RowsProcessed; SetLength(KC,numkc); i:=0; //VALORES DEL LEFT Y DEL TOP x:=115; y:=59; while not StoredProc1.eof do begin //CONF DEL RADIO BUTTON KC[i] := TRadioButton.Create(Self); KC[i].Parent := Form1.GroupBox2; KC[i].Height := 17; KC[i].Width := 177; KC[i].Left := x; KC[i].Top := y+20; KC[i].Caption := OraStoredProc1.FieldValues['DEFINICION']; KC[i].Visible := true; OraStoredProc1.Next; Inc(i); end;


El problema que tengo es que solo me muestra 1 RadioButton con el último registro que lee... ¿Sabeis que puede pasar?

He probado a ejecutar el StoredProc1 dentro del bucle pero se queda la aplicación colgada...

Muchas gracias de antemano.
Un saludo!!
Responder Con Cita