pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Lambert <paul.lambert@autoledgers.com.au>
To: pgsql-odbc@postgresql.org
Subject: Re: Access violation - probably not the fault of Postgres
Date: Mon, 12 Mar 2007 10:04:18 +0900
Message-ID: <45F4A712.8090105@autoledgers.com.au> (raw)
In-Reply-To: <45F08759.7010207@autoledgers.com.au>
References: <45EF749F.5030107@autoledgers.com.au>
	<45F04B57.9010401@yucaipaco.com>
	<45F08759.7010207@autoledgers.com.au>

Paul Lambert wrote:
> David Gardner wrote:
>> Could you post the code in question? How are you initializing your 
>> recordset object? Have you tried feeding the database object an insert 
>> statement via the execute() function?
>>
>>
> 

A few more case examples to go with the previously posted code...


Record does not exist in the database, the following is therefore trying
to add it.

"12/03/2007 7:04:36 AM dbg 80- [+loading sundry product table]"
"12/03/2007 7:04:36 AM dbg 70-
[+load_table(Sundry_Product,Product_id,Dealer_id,Franchise,Workshop,Price_Type)]"
"12/03/2007 7:04:36 AM dbg 60- [Criteria = Product_id = 'BULLBAR' and
Dealer_id  = 'F65' and Franchise  = 'BLANK' and Workshop  = '0' and
Price_Type  = '0']"
"12/03/2007 7:04:36 AM dbg 60- [Opening table with criteria=Select *
from Sundry_Product where Product_id = 'BULLBAR' and Dealer_id  = 'F65'
and Franchise  = 'BLANK' and Workshop  = '0' and Price_Type  = '0']"
"12/03/2007 7:04:53 AM dbg 60- [Record not found, adding new]"
"12/03/2007 7:04:53 AM dbg 80- [  + load_xxx_to_db]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DEALER_ID.value to F65]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DATE_CHANGED.value to 06-Mar-2007]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
TIME_CHANGED.value to 1809]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRODUCT_ID.value to BULLBAR]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DES_1.value to Bullbar]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DES_2.value to ]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DES_3.value to ]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DES_4.value to ]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRODUCT_TYPE.value to S]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRODUCT_SALES_GROUP.value to 45]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_1.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_2.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_3.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_4.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
COST.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PARTS_HANDLING.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
INCLUDING_SALES_TAX.value to ]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PARTS_HANDLING_LIMIT.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
HANDLING_LIMIT_PER_PART.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_TYPE.value to ]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_PERCENTAGE.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
MARK_UP_PERCENTAGE.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
ROUND_UP_TO.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
SUBTRACT_FROM_ROUND_UP.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_MINIMUM.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_MAXIMUM.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
SUPPLIER_NO.value to 113]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
HANDLING_LIMIT_PER_RO.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
OBSOLETE.value to ]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
FRANCHISE.value to BLANK]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
WORKSHOP.value to 0]"
"12/03/2007 7:04:53 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_TYPE.value to 0]"
"12/03/2007 7:04:53 AM dbg 60- [  - load_xxx_to_db exit status  0]"
"12/03/2007 7:04:53 AM dbg 60- [  + updating table]"
<Access violation terminates program>

I then manually added an empty record with the 5 primary key fields
having the same value as
what my program has been trying to add and then piped the data into my
program to try
again.

"12/03/2007 7:06:26 AM dbg 80- [+loading sundry product table]"
"12/03/2007 7:06:26 AM dbg 70-
[+load_table(Sundry_Product,Product_id,Dealer_id,Franchise,Workshop,Price_Type)]"
"12/03/2007 7:06:26 AM dbg 60- [Criteria = Product_id = 'BULLBAR' and
Dealer_id  = 'F65' and Franchise  = 'BLANK' and Workshop  = '0' and
Price_Type  = '0']"
"12/03/2007 7:06:26 AM dbg 60- [Opening table with criteria=Select *
from Sundry_Product where Product_id = 'BULLBAR' and Dealer_id  = 'F65'
and Franchise  = 'BLANK' and Workshop  = '0' and Price_Type  = '0']"
"12/03/2007 7:06:43 AM dbg 60- [Record found, updating]"
"12/03/2007 7:06:43 AM dbg 80- [  + load_xxx_to_db]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DEALER_ID.value to F65]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DATE_CHANGED.value to 06-Mar-2007]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
TIME_CHANGED.value to 1809]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRODUCT_ID.value to BULLBAR]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DES_1.value to Bullbar]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DES_2.value to ]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DES_3.value to ]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DES_4.value to ]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRODUCT_TYPE.value to S]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRODUCT_SALES_GROUP.value to 45]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_1.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_2.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_3.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_4.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
COST.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PARTS_HANDLING.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
INCLUDING_SALES_TAX.value to ]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PARTS_HANDLING_LIMIT.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
HANDLING_LIMIT_PER_PART.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_TYPE.value to ]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_PERCENTAGE.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
MARK_UP_PERCENTAGE.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
ROUND_UP_TO.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
SUBTRACT_FROM_ROUND_UP.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_MINIMUM.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
DISC_MAXIMUM.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
SUPPLIER_NO.value to 113]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
HANDLING_LIMIT_PER_RO.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
OBSOLETE.value to ]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
FRANCHISE.value to BLANK]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
WORKSHOP.value to 0]"
"12/03/2007 7:06:43 AM dbg 90- [     + load_xxx_to_db > Setting
PRICE_TYPE.value to 0]"
"12/03/2007 7:06:43 AM dbg 60- [  - load_xxx_to_db exit status  0]"
"12/03/2007 7:06:43 AM dbg 60- [  + updating table]"
"12/03/2007 7:06:46 AM dbg 60- [  - updating table]"
"12/03/2007 7:06:46 AM dbg 60- [-load_table]"


Success!

Would this be some sort of permissions problem?

To make matters more interesting, my program was adding two records into
another table, said table was empty, thus adding new records in both
cases. The first one worked but the second one caused an access violation.


"12/03/2007 7:07:30 AM dbg 80- [+loading deal line table]"
"12/03/2007 7:07:30 AM dbg 70-
[+load_table(Deal_lines,Address,Dealer_id,,,)]"
"12/03/2007 7:07:30 AM dbg 60- [Criteria = Address = '73969' and
Dealer_id  = 'F65']"
"12/03/2007 7:07:30 AM dbg 60- [Opening table with criteria=Select *
from Deal_lines where Address = '73969' and Dealer_id  = 'F65']"
"12/03/2007 7:07:41 AM dbg 60- [Record not found, adding new]"
"12/03/2007 7:07:41 AM dbg 80- [  + load_xxx_to_db]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
DEALER_ID.value to F65]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
DATE_CHANGED.value to 06-Mar-2007]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
TIME_CHANGED.value to 1813]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
DEAL_ADDRESS.value to 0]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
LINE_TYPE.value to V]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
ADDRESS.value to 73969]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
DELETED.value to 30]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
VEHICLE_ADDRESS.value to 1001]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
DEAL_NO.value to 1]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
ORDER_CODE.value to 99COST_ADJUST]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
REFERENCE.value to ]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
ORDER_DESC.value to Vehicle Cost Adjust]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_PRICE.value to 0]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_TAX.value to 0]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_COST.value to 1290.56]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_PAYMENT.value to 0]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
FORMAT_CODE.value to ]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_CODE.value to C]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
OPTION_CODE.value to ]"
"12/03/2007 7:07:41 AM dbg 90- [     + load_xxx_to_db > Setting
OPTION_SEQUENCE.value to ]"
"12/03/2007 7:07:41 AM dbg 60- [  - load_xxx_to_db exit status  0]"
"12/03/2007 7:07:41 AM dbg 60- [  + updating table]"
"12/03/2007 7:07:42 AM dbg 60- [  - updating table]"
"12/03/2007 7:07:42 AM dbg 60- [-load_table]"
<this indicates it completed succesfully>
"12/03/2007 7:07:42 AM dbg 10- [-process_dmq_message]"
"12/03/2007 7:07:42 AM dbg 80- [+read_dmq_message: Processed message,
ODBC State 0]"
"12/03/2007 7:07:42 AM dbg 80- [confirming message]"
"12/03/2007 7:07:42 AM dbg 80- [-read_dmq_message]"
"12/03/2007 7:07:42 AM dbg 80- [+read_dmq_message]"
"12/03/2007 7:07:42 AM dbg 80- [+read_dmq_message: Message Read with
Status = 1]"
"12/03/2007 7:07:42 AM dbg 80- [validating DmQ header]"
"12/03/2007 7:07:42 AM dbg 10- [+process_dmq_message]"
"12/03/2007 7:07:42 AM dbg 80- [+extract_items]"
"12/03/2007 7:07:42 AM dbg 80- [-extract_items]"
"12/03/2007 7:07:42 AM dbg 80- [+unpack_items]"
"12/03/2007 7:07:42 AM dbg 80- [-unpack_items]"
"12/03/2007 7:07:42 AM dbg 80- [+loading deal line table]"
"12/03/2007 7:07:42 AM dbg 70-
[+load_table(Deal_lines,Address,Dealer_id,,,)]"
"12/03/2007 7:07:42 AM dbg 60- [Criteria = Address = '73970' and
Dealer_id  = 'F65']"
"12/03/2007 7:07:42 AM dbg 60- [Opening table with criteria=Select *
from Deal_lines where Address = '73970' and Dealer_id  = 'F65']"
"12/03/2007 7:07:46 AM dbg 60- [Record not found, adding new]"
"12/03/2007 7:07:46 AM dbg 80- [  + load_xxx_to_db]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
DEALER_ID.value to F65]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
DATE_CHANGED.value to 06-Mar-2007]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
TIME_CHANGED.value to 1813]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
DEAL_ADDRESS.value to 0]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
LINE_TYPE.value to P]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
ADDRESS.value to 73970]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
DELETED.value to 30]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
VEHICLE_ADDRESS.value to 1001]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
DEAL_NO.value to 1]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
ORDER_CODE.value to ABULLBAR   GEN]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
REFERENCE.value to ]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
ORDER_DESC.value to Bullbar.]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_PRICE.value to 1500]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_TAX.value to 136.36]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_COST.value to 1363.64]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_PAYMENT.value to 1500]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
FORMAT_CODE.value to ]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
INVOICE_CODE.value to C]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
OPTION_CODE.value to ]"
"12/03/2007 7:07:46 AM dbg 90- [     + load_xxx_to_db > Setting
OPTION_SEQUENCE.value to ]"
"12/03/2007 7:07:46 AM dbg 60- [  - load_xxx_to_db exit status  0]"
"12/03/2007 7:07:46 AM dbg 60- [  + updating table]"
<Access violation terminates program>

The first example points to a possible permissions problem, can update
but not add - but the second example counters that by being able to add
one record but not another which would point to something in the data...
both completely contradicting each other. :(

I'm tearing my hair out here (which is not really a problem since I'm
shaving it all off for charity on Friday) trying to get this thing
working... it's got me completely boggled.

I'm in the process of setting up a small test case to rule out or 
confirm the data as being the problem. But that will have to wait until 
tomorrow to finish so I'll let you know what I find then, but if anyone 
has any other thoughts between now and then, I'd love to hear them.

Thanks,
Paul.

--
Paul Lambert
Database Administrator
AutoLedgers



view thread (10+ messages)  latest in thread

Message-ID: <45F4A712.8090105@autoledgers.com.au>
Permalink:  ../45F4A712.8090105@autoledgers.com.au/
Also on:    postgresql.org/message-id/45F4A712.8090105@autoledgers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: paul.lambert@autoledgers.com.au
  Subject: Re: Access violation - probably not the fault of Postgres
  In-Reply-To: <45F4A712.8090105@autoledgers.com.au>
  References: <45EF749F.5030107@autoledgers.com.au> <45F04B57.9010401@yucaipaco.com> <45F08759.7010207@autoledgers.com.au> <45F4A712.8090105@autoledgers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox