procedure TformFPago.btn1Click(Sender: TObject);
type
RegFormadePago =Record
TipoPago : integer;
BancoTarjeta : string[40];
Detalle : string[90];
RetencionIVA : Boolean;
MontoBsViejos : Double;
MontoPago : currency;
NoEsEfectivo : Boolean;
end;
AFormadePago = Array[0..9] of RegFormadePago;
var
fcccodigo:string;
datospago:RegFormadePago;
campoblob:TBlobField;
bs:Tstream;
codigo:string;
SQLSelect1,cfactura:String;
begin
SQLSelect1:= 'Select * from Scuentasxcobrar where FCC_NUMERO= :fccnumero';
cfactura:=edtfactura.Text;
sqcxc.SQL.Text := SQLSelect1;
sqcxc.ParamByName('fccnumero').AsString:=cfactura;
sqcxc.ExecSQL;
sqcxc.Open;
while not sqcxc.Eof do
Begin
codigo:=sqcxc.FieldByName('FCC_NUMERO').AsString;
campoblob:=sqcxc.FieldByName('FCC_FORMAPAGO') as tblobfield;
bs := sqcxc.CreateBlobStream(campoblob, bmRead) ;
bs.Seek(0,sofrombeginning);
try
bs.read(datospago,SizeOf(RegFormadePago));
finally
bs.Free;
end;
edt1.Text:=codigo;
edt2.Text:=currtostrf(datospago.montopago,ffCurrency,2);
sqcxc.Next;
End;
end;