pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
8+ messages / 2 participants
[nested] [flat]

* Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-04 22:44  Adrien de Croy <adrien@qbik.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Adrien de Croy @ 2010-11-04 22:44 UTC (permalink / raw)
  To: pgsql-odbc


Hi all

I'm getting an access violation from within SQLDescribeColW when I'm 
getting the result scheme from a query.

the query is pretty simple:

SELECT count(*) as folder_files, sum(file_size) as folder_size, 
sum(disk_use) as folder_size_disk, folder_id from cache_index where 
volume_id = %u group by folder_id

SQLExecute returns OK
SQLNumResultCols returns 4 columns as expected

the SQLDescribeColW blows up when calling with column #2, corresponding 
to sum(file_size).  file_size is a bigint field.  There are only 5 
records, and the sum of the file_size is under 1MB.  So shouldn't be any 
bigint overflow or something.

I used to use a double precision and it worked fine, then I figured out 
how to store into a bigint field and now this happens every time I do 
this query if there are any records in the table.  If there are no 
records it's fine.

Regards

Adrien de Croy



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-05 08:53  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Adrien de Croy <adrien@qbik.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Hiroshi Inoue @ 2010-11-05 08:53 UTC (permalink / raw)
  To: Adrien de Croy <adrien@qbik.com>; +Cc: pgsql-odbc

Hi、

(2010/11/05 7:44), Adrien de Croy wrote:
>
> Hi all
>
> I'm getting an access violation from within SQLDescribeColW when I'm
> getting the result scheme from a query.

Hmm I may have introduced a bug in 9.0.0200.

Could you please try the drivers on testing for 9.0.0201 at
    http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
?

regards,
Hiroshi Inoue

> the query is pretty simple:
>
> SELECT count(*) as folder_files, sum(file_size) as folder_size,
> sum(disk_use) as folder_size_disk, folder_id from cache_index where
> volume_id = %u group by folder_id
>
> SQLExecute returns OK
> SQLNumResultCols returns 4 columns as expected
>
> the SQLDescribeColW blows up when calling with column #2, corresponding
> to sum(file_size). file_size is a bigint field. There are only 5
> records, and the sum of the file_size is under 1MB. So shouldn't be any
> bigint overflow or something.
>
> I used to use a double precision and it worked fine, then I figured out
> how to store into a bigint field and now this happens every time I do
> this query if there are any records in the table. If there are no
> records it's fine.
>
> Regards
>
> Adrien de Croy




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-10 01:40  Adrien de Croy <adrien@qbik.com>
  parent: Hiroshi Inoue <inoue@tpf.co.jp>
  1 sibling, 1 reply; 8+ messages in thread

From: Adrien de Croy @ 2010-11-10 01:40 UTC (permalink / raw)
  To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc


Hi Hiroshi

this build has another problem

::SQLTables no longer returns the table name at all (empty string).

So I can't test any further, since I require this for all my startup 
code, type retrieval etc (for a column of a table def).

Regards

Adrien


On 5/11/2010 9:53 p.m., Hiroshi Inoue wrote:
> Hi、
>
> (2010/11/05 7:44), Adrien de Croy wrote:
>>
>> Hi all
>>
>> I'm getting an access violation from within SQLDescribeColW when I'm
>> getting the result scheme from a query.
>
> Hmm I may have introduced a bug in 9.0.0200.
>
> Could you please try the drivers on testing for 9.0.0201 at
>    http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
> ?
>
> regards,
> Hiroshi Inoue
>
>> the query is pretty simple:
>>
>> SELECT count(*) as folder_files, sum(file_size) as folder_size,
>> sum(disk_use) as folder_size_disk, folder_id from cache_index where
>> volume_id = %u group by folder_id
>>
>> SQLExecute returns OK
>> SQLNumResultCols returns 4 columns as expected
>>
>> the SQLDescribeColW blows up when calling with column #2, corresponding
>> to sum(file_size). file_size is a bigint field. There are only 5
>> records, and the sum of the file_size is under 1MB. So shouldn't be any
>> bigint overflow or something.
>>
>> I used to use a double precision and it worked fine, then I figured out
>> how to store into a bigint field and now this happens every time I do
>> this query if there are any records in the table. If there are no
>> records it's fine.
>>
>> Regards
>>
>> Adrien de Croy
>
>



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-10 01:48  Adrien de Croy <adrien@qbik.com>
  parent: Hiroshi Inoue <inoue@tpf.co.jp>
  1 sibling, 1 reply; 8+ messages in thread

From: Adrien de Croy @ 2010-11-10 01:48 UTC (permalink / raw)
  To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc


also seems to break the table scheme.  This one isn't important to me, 
but maybe to others.

One other thing I found, even on the 9.00.0200 build.

Once you fetch data on a field in a record, if you try to fetch the same 
field on the same row again (without moving cursor or anything) it blows 
up also.  fetching seems to alter what you fetch.

Regards

Adrien


On 5/11/2010 9:53 p.m., Hiroshi Inoue wrote:
> Hi、
>
> (2010/11/05 7:44), Adrien de Croy wrote:
>>
>> Hi all
>>
>> I'm getting an access violation from within SQLDescribeColW when I'm
>> getting the result scheme from a query.
>
> Hmm I may have introduced a bug in 9.0.0200.
>
> Could you please try the drivers on testing for 9.0.0201 at
>    http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
> ?
>
> regards,
> Hiroshi Inoue
>
>> the query is pretty simple:
>>
>> SELECT count(*) as folder_files, sum(file_size) as folder_size,
>> sum(disk_use) as folder_size_disk, folder_id from cache_index where
>> volume_id = %u group by folder_id
>>
>> SQLExecute returns OK
>> SQLNumResultCols returns 4 columns as expected
>>
>> the SQLDescribeColW blows up when calling with column #2, corresponding
>> to sum(file_size). file_size is a bigint field. There are only 5
>> records, and the sum of the file_size is under 1MB. So shouldn't be any
>> bigint overflow or something.
>>
>> I used to use a double precision and it worked fine, then I figured out
>> how to store into a bigint field and now this happens every time I do
>> this query if there are any records in the table. If there are no
>> records it's fine.
>>
>> Regards
>>
>> Adrien de Croy
>
>



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-10 03:49  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Adrien de Croy <adrien@qbik.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Hiroshi Inoue @ 2010-11-10 03:49 UTC (permalink / raw)
  To: Adrien de Croy <adrien@qbik.com>; +Cc: pgsql-odbc

(2010/11/10 10:40), Adrien de Croy wrote:
>
> Hi Hiroshi
>
> this build has another problem
>
> ::SQLTables no longer returns the table name at all (empty string).

Oops, I seem to have introduced another bug so as to fix
  [ODBC] Errors using psqlodbc .
I would fix it and report soon.

regards,
Hiroshi Inoue

> So I can't test any further, since I require this for all my startup
> code, type retrieval etc (for a column of a table def).
>
> Regards
>
> Adrien
>
>
> On 5/11/2010 9:53 p.m., Hiroshi Inoue wrote:
>> Hi、
>>
>> (2010/11/05 7:44), Adrien de Croy wrote:
>>>
>>> Hi all
>>>
>>> I'm getting an access violation from within SQLDescribeColW when I'm
>>> getting the result scheme from a query.
>>
>> Hmm I may have introduced a bug in 9.0.0200.
>>
>> Could you please try the drivers on testing for 9.0.0201 at
>> http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
>> ?
>>
>> regards,
>> Hiroshi Inoue
>>
>>> the query is pretty simple:
>>>
>>> SELECT count(*) as folder_files, sum(file_size) as folder_size,
>>> sum(disk_use) as folder_size_disk, folder_id from cache_index where
>>> volume_id = %u group by folder_id
>>>
>>> SQLExecute returns OK
>>> SQLNumResultCols returns 4 columns as expected
>>>
>>> the SQLDescribeColW blows up when calling with column #2, corresponding
>>> to sum(file_size). file_size is a bigint field. There are only 5
>>> records, and the sum of the file_size is under 1MB. So shouldn't be any
>>> bigint overflow or something.
>>>
>>> I used to use a double precision and it worked fine, then I figured out
>>> how to store into a bigint field and now this happens every time I do
>>> this query if there are any records in the table. If there are no
>>> records it's fine.
>>>
>>> Regards
>>>
>>> Adrien de Croy




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-10 03:52  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Adrien de Croy <adrien@qbik.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Hiroshi Inoue @ 2010-11-10 03:52 UTC (permalink / raw)
  To: Adrien de Croy <adrien@qbik.com>; +Cc: pgsql-odbc

Hi Adrien,

(2010/11/10 10:48), Adrien de Croy wrote:
>
> also seems to break the table scheme. This one isn't important to me,
> but maybe to others.
>
> One other thing I found, even on the 9.00.0200 build.
>
> Once you fetch data on a field in a record, if you try to fetch the same
> field on the same row again (without moving cursor or anything) it blows
> up also. fetching seems to alter what you fetch.

What do you mean by *fetch(again)*?

regards,
Hiroshi Inoue

>
> On 5/11/2010 9:53 p.m., Hiroshi Inoue wrote:
>> Hi、
>>
>> (2010/11/05 7:44), Adrien de Croy wrote:
>>>
>>> Hi all
>>>
>>> I'm getting an access violation from within SQLDescribeColW when I'm
>>> getting the result scheme from a query.
>>
>> Hmm I may have introduced a bug in 9.0.0200.
>>
>> Could you please try the drivers on testing for 9.0.0201 at
>> http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
>> ?
>>
>> regards,
>> Hiroshi Inoue
>>
>>> the query is pretty simple:
>>>
>>> SELECT count(*) as folder_files, sum(file_size) as folder_size,
>>> sum(disk_use) as folder_size_disk, folder_id from cache_index where
>>> volume_id = %u group by folder_id
>>>
>>> SQLExecute returns OK
>>> SQLNumResultCols returns 4 columns as expected
>>>
>>> the SQLDescribeColW blows up when calling with column #2, corresponding
>>> to sum(file_size). file_size is a bigint field. There are only 5
>>> records, and the sum of the file_size is under 1MB. So shouldn't be any
>>> bigint overflow or something.
>>>
>>> I used to use a double precision and it worked fine, then I figured out
>>> how to store into a bigint field and now this happens every time I do
>>> this query if there are any records in the table. If there are no
>>> records it's fine.
>>>
>>> Regards
>>>
>>> Adrien de Croy
>>
>>
>
>
>
>





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-10 04:04  Adrien de Croy <adrien@qbik.com>
  parent: Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 1 reply; 8+ messages in thread

From: Adrien de Croy @ 2010-11-10 04:04 UTC (permalink / raw)
  To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc


Hi

I have some helper classes to fetch fields from a record, a helper class 
to manage iteration through a result set.

If I call my fetch helper function for some field ordinal it works fine 
the first time.  If I call it again (without having called any method to 
change the current row in the result set) it fails on the same ordinal, 
but works on other ordinals.

So, it looks to me like the fetch call is cleaning up the field data 
when you fetch, rather than cleaning up the row when you say move to the 
next row.

I don't know if this is a bug or not - for instance MS SQL server fails 
if you fetch columns in a non-monitonically-increasing column ordinal 
order.  E.g. fetch columns 1, 2, 3 works but not 1, 3, 2.  So maybe ODBC 
doesn't guarantee it's safe to call fetch columns 1, 1, x

Adrien




On 10/11/2010 4:52 p.m., Hiroshi Inoue wrote:
> Hi Adrien,
>
> (2010/11/10 10:48), Adrien de Croy wrote:
>>
>> also seems to break the table scheme. This one isn't important to me,
>> but maybe to others.
>>
>> One other thing I found, even on the 9.00.0200 build.
>>
>> Once you fetch data on a field in a record, if you try to fetch the same
>> field on the same row again (without moving cursor or anything) it blows
>> up also. fetching seems to alter what you fetch.
>
> What do you mean by *fetch(again)*?
>
> regards,
> Hiroshi Inoue
>
>>
>> On 5/11/2010 9:53 p.m., Hiroshi Inoue wrote:
>>> Hi、
>>>
>>> (2010/11/05 7:44), Adrien de Croy wrote:
>>>>
>>>> Hi all
>>>>
>>>> I'm getting an access violation from within SQLDescribeColW when I'm
>>>> getting the result scheme from a query.
>>>
>>> Hmm I may have introduced a bug in 9.0.0200.
>>>
>>> Could you please try the drivers on testing for 9.0.0201 at
>>> http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
>>> ?
>>>
>>> regards,
>>> Hiroshi Inoue
>>>
>>>> the query is pretty simple:
>>>>
>>>> SELECT count(*) as folder_files, sum(file_size) as folder_size,
>>>> sum(disk_use) as folder_size_disk, folder_id from cache_index where
>>>> volume_id = %u group by folder_id
>>>>
>>>> SQLExecute returns OK
>>>> SQLNumResultCols returns 4 columns as expected
>>>>
>>>> the SQLDescribeColW blows up when calling with column #2, 
>>>> corresponding
>>>> to sum(file_size). file_size is a bigint field. There are only 5
>>>> records, and the sum of the file_size is under 1MB. So shouldn't be 
>>>> any
>>>> bigint overflow or something.
>>>>
>>>> I used to use a double precision and it worked fine, then I figured 
>>>> out
>>>> how to store into a bigint field and now this happens every time I do
>>>> this query if there are any records in the table. If there are no
>>>> records it's fine.
>>>>
>>>> Regards
>>>>
>>>> Adrien de Croy
>>>
>>>
>>
>>
>>
>>
>
>



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW
@ 2010-11-10 04:25  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Adrien de Croy <adrien@qbik.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Hiroshi Inoue @ 2010-11-10 04:25 UTC (permalink / raw)
  To: Adrien de Croy <adrien@qbik.com>; +Cc: pgsql-odbc

(2010/11/10 13:04), Adrien de Croy wrote:
>
> Hi
>
> I have some helper classes to fetch fields from a record, a helper class
> to manage iteration through a result set.
>
> If I call my fetch helper function for some field ordinal it works fine
> the first time. If I call it again (without having called any method to
> change the current row in the result set) it fails on the same ordinal,
> but works on other ordinals.
>
> So, it looks to me like the fetch call is cleaning up the field data
> when you fetch,

If the helper function calls SQLGetData() for the column, yes.
SQLGetData() cleans up data which it returns to the caller and
returns SQL_NO_DATA when all data was returned to the caller.
You can divide into multiple SQLGetData() calls using this feature
when a column has a big data.

regards,
Hiroshi Inoue




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2010-11-10 04:25 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-04 22:44 Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW Adrien de Croy <adrien@qbik.com>
2010-11-05 08:53 ` Hiroshi Inoue <inoue@tpf.co.jp>
2010-11-10 01:40   ` Adrien de Croy <adrien@qbik.com>
2010-11-10 03:49     ` Hiroshi Inoue <inoue@tpf.co.jp>
2010-11-10 01:48   ` Adrien de Croy <adrien@qbik.com>
2010-11-10 03:52     ` Hiroshi Inoue <inoue@tpf.co.jp>
2010-11-10 04:04       ` Adrien de Croy <adrien@qbik.com>
2010-11-10 04:25         ` Hiroshi Inoue <inoue@tpf.co.jp>

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