Cita:
Empezado por ingabraham
no se si eso me sirvira pero yo quiero es esto.
|
Bueno habría bastado con probarlo...
Simplifiqué un poco el código anterior y acabo de hacer esta prueba:
Código Delphi
[-]
...
var
s: string;
c,i: Integer;
begin
IBQuery1.SQL.Text:= 'insert into clientes values(:a,:b,:c,:d)';
IBQuery1.ParamByName('a').AsString:= QuotedStr('001');
IBQuery1.ParamByName('b').AsString:= QuotedStr('abraham');
IBQuery1.ParamByName('c').AsString:= QuotedStr('18');
IBQuery1.ParamByName('d').AsString:= QuotedStr('lorica');
s:= '';
c:= 0;
for i:= 1 to Length(IBQuery1.Text) do
begin
if IBQuery1.Text[i] = '?' then
begin
s:= s + IBQuery1.Params[c].AsString;
Inc(c);
end
else
s:= s + IBQuery1.Text[i];
end;
ShowMessage(s);
end;
y obtengo este resultado en pantalla:
Cita:
insert into clientes values('001','abraham','18','lorica')
|
Que, si no entiendo mal, es lo que estás solicitando.
Saludos.