FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#6
|
|||
|
|||
Espero que te sirva
Prueba con esto.
function ParseSQL(textoE: String; delimitador: String): String; var fila: Integer; index: Integer; delta: Integer; cadena: String; textoS: String; textoTMP: String; begin Result := EmptyStr; fila := 0; delta := Length(delimitador); textoS := textoE + delimitador; try while Length(textoS) > 0 do begin index := Pos(delimitador, textoS); cadena := Copy(textoS, 0, index - 1); textoS := Copy(textoS, index + delta, MaxInt); if (fila > 0) then textoTMP := textoTMP + cadena + chr(13); Inc(fila); end; finally Result := textoTMP; end; end; Para utlizar esta función, te doy un ejemplo, dentro de un boton colocas esto: procedure TForm1.Button1Click(Sender: TObject); var textoE: String; textoS: String; begin textoE:= 'CORONA TAVAREZ, RAQUEL EUNICE PEREZ AGUILERA, ANA ERCILIA QUEVEDO RAMIREZ, ESTEBAN'; textoS := ParseSQL(textoE, ','); ShowMessage(textoS); end; |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Leer texto caracter a caracter | kikecg | Firebird e Interbase | 11 | 23-11-2010 17:44:44 |
leer caracter por caracter, una linea de un memo | douglas | OOP | 1 | 05-10-2007 06:59:31 |
Stored Procedure con un If después de un Select | gluglu | Conexión con bases de datos | 12 | 08-08-2007 20:15:46 |
Ayudaaaa!!! Tabla ASCII: El carácter Ñ vs. carácter ¥ | Berto2003 | Varios | 5 | 26-07-2005 15:37:48 |
¿Por qué CommitRetaining funciona después de agregar, pero no después de modificar? | Al González | Firebird e Interbase | 7 | 16-02-2004 23:47:28 |
|