Re: Problem trying insert data into a temp table via SP On 1 nov, 09:55, Superboer <superbo...@t-online.de> wrote:
> this is most likely because of
> the env vars missing in
>
> > system "dbaccess maindb /tmp/subir_listkraft.sql";
>
> i would create a script with the env vars set and call that.
>
> debug:
>
> > system " ( dbaccess maindb /tmp/subir_listkraft.sql ) >/tmp/tessie 2>&1 ";
>
> where /tmp/tessie does not exist.
> check what is in tessie; it'll probably say that the env is not
> there.....
>
> Superboer
>
> way fast=http://www.clipjes.nl/clip/nederlands/n/normaal_-
> _oerend_hard.html
>
> On 1 nov, 15:44, an_dario <andro...@gmail.com> wrote:
>
> > Hello!
> > I've got a stored procedure which returns data for a report, but for
> > generate it, needs to load some data into a temp table. I do this with
> > this syntax:
>
> > --The temporary table is called 'xreg_kraft'
> > system "echo 'load from /tmp/listkraft_tmp.csv insert into
> > xreg_kraft;' > /tmp/subir_listkraft.sql";
>
> > system "dbaccess maindb /tmp/subir_listkraft.sql";
>
> > When the SP tries to run this line, throws an -668 exception (System
> > command cannot be executed), with -255 ISAM error (Not in
> > transaction). I tried to fix this error handling the exception like
> > this:
>
> > begin
> > on exception in (-668)
> > begin work;
> > end exception with resume;
> > system "dbaccess maindb /tmp/subir_listkraft.sql";
> > end
>
> > But throws another exception, -535 (Already in transaction), this
> > time, with -255 ISAM error (Not in transaction), and makes me confuse,
> > because I thought opened the transaction, but I can't see where it is.
>
> > Can you give me some clues about this? I appreciate your valuable
> > help!
>
> > Andres.
Hello. Thanks for your help. I've realized DB_LOCALE environment is
not set.
Warning: DB_LOCALE environment variable does not match locale of the
database.
But, now I don't know how to fix this inside the SP? Can you help me
with this?
Thanks again! |