Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Conexión con bases de datos (https://www.clubdelphi.com/foros/forumdisplay.php?f=2)
-   -   Inconveniente con asignacion a un Dataset (https://www.clubdelphi.com/foros/showthread.php?t=23099)

dmagui 06-07-2005 18:39:31

Inconveniente con asignacion a un Dataset
 
Código Delphi [-]
'select * from subcomp where cod_componente = ' + Quotedstr (DBLookupComboBox1.KeyValue) + 'and item_comp = ' + Quotedstr (DBLookupComboBox3.KeyValue);
hola a todos, una pregunta ??? :confused:

como hago para asignar este codigo a el selectsql de un Dataset desde delphi

please ayudenme :(

dmagui 06-07-2005 21:28:22

Gracias ya lo logre hacer solo tenia que hacer lo siguiente

Código Delphi [-]
 
IBDataSet2.Close;
   IBDataSet2.SelectSQL.Clear;
   IBDataSet2.SelectSQL.Add ('select * from subcomp where cod_componente = ' + Quotedstr (DBLookupComboBox1.KeyValue) + 'and item_comp = ' + Quotedstr (DBLookupComboBox3.KeyValue));
   IBDataSet2.Open;
   IBDataSet2.Active := True;

:D :D :D :D

Crandel 07-07-2005 05:53:08

La forma correcta de usarlo es:

Código Delphi [-]
   IBDataSet2.Close;
   IBDataSet2.SelectSQL.Clear;
   IBDataSet2.SelectSQL.Add ('select * from subcomp where cod_componente = ' + Quotedstr (DBLookupComboBox1.KeyValue) + 'and item_comp = ' + Quotedstr (DBLookupComboBox3.KeyValue));
   IBDataSet1.Prepare;
   IBDataSet2.Open;

El active esta demás.


La franja horaria es GMT +2. Ahora son las 13:49:43.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi