[ic] Remote Database Connection Follow-up - Query Going Local in Certain Scripts

Andrew Baltino augustine.andrew at gmail.com
Wed Sep 27 22:20:44 EDT 2006


>Andrew Baltino wrote:
>>
>> In certain parts of the log_transaction script the query tag is
>> attempting reference the local database!  In other parts of the script
>> it gives me this error:
>>
>>
>> 192.168.100.31 V5BfHpCv:192.168.100.31 - [07/September/2006:23:27:07
>> -0400] store_devel /cgi-bin/store_devel/process.html ERRORS on ORDER
>> L000003028:
>>> Error during creation of order routing log:
>>> Route log failed. at /home/store/interchange/lib/Vend/Order.pm line 1577.
>>>
>>
>> Any suggestions?  I put the code in a usertag and received the same error.
>>
>> I am running Interchange 4.8.5.
>>
>> Could I write a PERLscript that excepts arguments that I would pass to
>> an SQL query and call this PERL script from IC?
>
>Hi, Andy!
>
>I think it would be helpful if you clarified - how do you know that the
>query is happening on the local table? Does a table by that name exist
>in both local and remote databases? Are you seeing other errors? Can you
>post the code you are using for this query?
>
>As to running the query in a Perl script, the best way to do this in IC
>is to turn that script into a usertag, which it seems you have tried. We
>just need to figure out what's really happening with the database
>connection/query.
>
>JT


Thanks JT.  Sorry I am a little late in getting back to this.  I wish
I knew more about the structure and format of log_transaction.  The
query I use in the query tag decrements an inventory count, and it is
decrementing the count in the local table, and not the remote table.

However when put the query tag in a different part of the script,
basically further down in the script, or use a usertag to encapsulate
my query I get the error I sent.
Also, the tables with the same exist in both DBs the local and remote.
 If I DROP the local table IC complains when I restart it.


I am also getting a new error which shows my query.  I know that when
I run the query in psql directly it works, so the query itself is
fine:
192.168.100.31 JKbTAjBA:192.168.100.31 - [27/September/2006:22:08:49
-0400] store_devel /cgi-bin/store_devel/process.html
> inventory_decrease.tag query:  UPDATE itemstat SET item_quantity=(to_number(item_quantity, '9999999') - 3) WHERE item_number='1404046'
>
192.168.100.31 JKbTAjBA:192.168.100.31 - [27/September/2006:22:08:49
-0400] store_devel /cgi-bin/store_devel/process.html Safe: DBD::Pg::st
fetch failed: no statement executing




192.168.100.31 JKbTAjBA:192.168.100.31 - [27/September/2006:22:08:49
-0400] store_devel /cgi-bin/store_devel/process.html Route log failed.
192.168.100.31 JKbTAjBA:192.168.100.31 - [27/September/2006:22:08:49
-0400] store_devel /cgi-bin/store_devel/process.html ERRORS on ORDER
L000003029:
> Error during creation of order routing log:
> Route log failed. at /home/store/interchange/lib/Vend/Order.pm line 1577.


Any advice or hints would be GREATLY appreciated.

Thanks!

Andy


More information about the interchange-users mailing list