I´m usin odac 4.00 with delphi 5
In a TORASQL i have a parameter marked as plsql table of string;
In the Delphi Code I have a loop that fills this param, like this:
Code: Select all
for IdxLinea := 1 to GrdMultiDatos.RowCount - 1 do
begin
Ld_SumaMontos := 0;
Ld_SumaServiciosDiversos := 0;
Li_Columna := 5;
repeat
if Trim(GrdMultiDatos.Cells[Li_Columna, IdxLinea]) '' then
Ld_SumaMontos :=
Ld_SumaMontos +
StrToFloat(Trim(GrdMultiDatos.Cells[Li_Columna, IdxLinea]));
if Trim(GrdMultiDatos.Cells[Li_Columna+1, IdxLinea]) '' then
Ld_SumaServiciosDiversos :=
Ld_SumaServiciosDiversos +
StrToFloat(Trim(GrdMultiDatos.Cells[Li_Columna+1, IdxLinea]));
Li_Columna := Li_Columna + 2;
until Li_Columna > GrdMultiDatos.ColCount - 1;
{rangos (carros, pesos), neto sugerido, flete, sd, otros part, iva,
v arrastre, v paso puente, ch, frontera, paso puente, arrastre}
ParamByName('prangos').ItemAsString[IdxLinea]:=
Trim(QUITA_COMAS(GrdMultiDatos.Cells[1, IdxLinea])) + '|' +
Trim(QUITA_COMAS(GrdMultiDatos.Cells[2, IdxLinea])) + '|' +
Trim(QUITA_COMAS(GrdMultiDatos.Cells[3, IdxLinea])) + '|' +
Trim(QUITA_COMAS(GrdMultiDatos.Cells[4, IdxLinea])) + '|' +
FloatToStr(Ld_SumaMontos + Ld_SumaServiciosDiversos) + '|' +
FloatToStr(Ld_SumaMontos) + '|' +
FloatToStr(Ld_SumaServiciosDiversos) + '|0|' +
Trim(QUITA_COMAS(EdIVA.Text)) + '|0|0|' +
iif(ckCarHire.Checked,'1','0') + '|' +
iif(CkBxCruceFrontera.Checked,'1','0') + '|' +
iif(CkBxPasoPuente.Checked,'1','0') + '|' +
iif(CkBxArrastre.Checked,'1','0') + '|0|';
end; {for}
for example if the loop assign 1|99999|99|200|29000|29000|0|0|15|0|0|0|0|0|0|0| to the first element
and
1|99999|201|300|30000|30000|0|0|15|0|0|0|0|0|0|0|
to the second, some how the first elements get ''. this is something sporadic.
Hope you can help me, thanks in advance