![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Insertar Datos De Un Dbgrid A Una Tabla
HOLA QUE TAL , BUENO SOY NUEVO EN DELPHI , TENGO UN PROBLEMA , TENGO UN DBGRID DONDE MUESTRO LA INFORMACION DE UNA TABLA, Y DESPUES DE REALIZAR UNA BUSQUEDA ME GUSTARIA QUE LA FILA QUE FUE SELECCIONADA COMO RECULTADO DE LA BUSQUEDA `PODER INSERTARLA EN UNA TABLA EN MYSQL, EL PROBLEMA QUE TENGO , ES QUE NO SE COMO RECUPERAR LA INFORMACION DE LA FILA SELECCIONADA DESPUES DE MI BUSQUEDA PARA PODER INSERTARLA EN UNA TABLA , HE DADO UN VISTAZO POR LA INTERNET, Y NO HE PODIDO ENCONTRAR ALGO AL RESPECTO, ESPERO ALGUIEN ME PUEDA AYUDAR .. MUCHISIMAS GRACIAS, MUESTRO MI CODIGO PARA LA BUSQUEDA,
Código Delphi [-] procedure TFMain.Edit1Change(Sender: TObject); var i:integer; palabras: TStringList; consulta: String; begin if Edit1.Text = '' then begin consulta:='Select * from productos'; ZQuery.close; ZQuery.sql.clear; ZQuery.sql.add(consulta); ZQuery.open; end else begin palabras := TStringList.Create; palabras.CommaText := Edit1.Text; ZQuery.close; ZQuery.sql.clear; for i:=0 to palabras.Count-1 do begin consulta:=consulta+'and Producto like "%'+palabras.Strings[i]+'%"'; end; Delete(consulta,1,3); consulta:='Select * from productos where'+consulta; ZQuery.SQL.Add(consulta); ZQuery.Open; end;//else end; |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
insertar datos en una tabla | Alkazar | C++ Builder | 3 | 13-11-2007 14:12:00 |
Como insertar datos a una tabla con un SP | Tauro78 | Firebird e Interbase | 1 | 31-01-2007 22:46:13 |
Dbgrid para insertar en una tabla pero cogiendo datos de otra tabla | taru | MySQL | 1 | 27-07-2006 15:36:12 |
insertar en tabla las lineas que seleccione el usuario desde un dbgrid | arpegius25 | Conexión con bases de datos | 3 | 09-05-2006 10:08:59 |
Como insertar datos de una tabla en otra tabla? | Salomon | Firebird e Interbase | 1 | 28-08-2003 11:29:40 |
![]() |
|