Ver Mensaje Individual
  #9  
Antiguo 09-01-2008
johnnySan johnnySan is offline
Registrado
 
Registrado: jun 2007
Posts: 9
Reputación: 0
johnnySan Va por buen camino
Smile

[quote=pcicom;227652]Prueba ESTO:

Yo trabajando en DBE , lleno datos en un stringgrid asi:

Código Delphi [-]procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var c:integer;begin
if Key=#13 then begin
query.sql.Closequery.sql.Clear;
query.SQL.Add(' SELECT ref, articulo, cantidad FROM articulos ');
query.SQL.Add('WHERE ref = '+QuotedStr(Edit1.Text) );
Open;
while not query.Eof do begin
StringGrid1.Cells[1,c]:=query.Fields[0].asstring; //campo de cantidad
StringGrid1.Cells[2,c]:=query1.Fields[1].asstring;//campo de articulo
inc(c);query.next; end;if c=1 then ShowMessage('Articulo no existe');
query.close; end;
end;
Pero en un ADO ,debe ser a ese estilo o... no se.
Responder Con Cita