plsql table problems

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Víctor
Posts: 2
Joined: Mon 05 Sep 2005 18:58
Location: México
Contact:

plsql table problems

Post by Víctor » Thu 29 Sep 2005 19:44

hi there,

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}
Well, sometimes the first element of the array is set to '', don't know why.

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

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 30 Sep 2005 12:51

We couldn't reproduce your problem. Please update your ODAC version to the latest one (update within one version is free i.e. you can get ODAC 4.50.4.25 at least) and try to reproduce your problem with it. If problem persists please send us small demo project that demonstrates your problem; include scripts to create server objects.

Post Reply