![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
#4
|
|||
|
|||
|
Buenas otra vez. Lo he planteado de otro forma xo me sigue dando error. He decidido recorrer los arrays e introducirlos en una vble string.
procedure TForm1.OpInsert(campos : array of string; Tabla:String); var i,j: integer; ConsultCamp,ConsultValor : String; begin with DM do begin for i:=low(campos) to high(campos) do ConsultCamp := ConsultCamp + '''' + campos[i] + '''' + ',' ; ConsultCamp := copy (ConsultCamp,-1,length(ConsultCamp)-2); for j:=low(VNuevos) to high(VNuevos) do ConsultValor := ConsultValor + '''' + VNuevos[j] + '''' + ',' ; ConsultValor := copy(ConsultValor,-1,length(ConsultValor)-1); {Memo1.Lines.Add(ConsultCamp); Memo1.Lines.Add(ConsultValor);} QrOperacion.SQL.Add('insert into ' + Tabla + '(' + ConsultCamp + ')'); QrOperacion.SQL.Add('values (' + ConsultValor + ')'); QrOperacion.Open; end; end; Pero me da un error: sql Parse error: EOF in string detected' |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| TIBTable ó TIBQuery | Loviedo | Firebird e Interbase | 5 | 25-05-2005 16:40:25 |
| TIBQuery no devuelve todos los registros | rochi | SQL | 0 | 27-02-2005 19:25:49 |
| Destruir un TIBQuery | furniman | Varios | 1 | 25-03-2004 12:20:14 |
| Problemas con In en TIBQuery | Rabata | Conexión con bases de datos | 1 | 15-10-2003 13:56:59 |
| Problemas con In en TIBQuery | Rabata | SQL | 1 | 15-10-2003 13:56:59 |
|