pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vincent Ladlad <vincentl@ntsp.nec.co.jp>
To: pgsql-odbc@postgresql.org
Subject: odbc driver problem?  or threading? or crecordset?
Date: Tue, 16 Mar 2004 09:23:35 +0800
Message-ID: <014701c40af5$4d6c6070$643b1cac@Titanium> (raw)

hi there!   im new to psqlodbc, and i hope you pros could help me out :)

i have been browsing the internet for more than
a week now, searching for clues regarding an
"access violation" error.  i hope maybe you can
help me get over this problem, as it has been
eating my dev schedule.

here's the problem:
i have two threads triggered by onTimer which
is set to 1 second.  when the timer expires,
the threads are notified, and a (select) query is started.
both threads use the same recordset class, but
different instance.  thread1 accesses server1 using datasource1. thread2
accesses server2 using datasource2. both tables are the same on both
servers, but have different values. that is why they  use the same
recordset.  
after a few timerEvents, the program stops, and the 
error message "access violation" is shown.  
during debug, i traced that the error occurs when
both thread attempts to call the crecordset::open function.
at the same time.  even though they access different 
datasources, the problem keeps coming back.  i only
issue a simple select statement with the following options --
(crecordset::snapshot, crecordset::readonly).

the recordset is open()ed and close()d after every query.
the cdatabase instance is not. it remains open. 

is there something i missed?

thanks,
vincentl

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.605 / Virus Database: 385 - Release Date: 3/1/2004
 




view thread (4+ messages)  latest in thread

Message-ID: <014701c40af5$4d6c6070$643b1cac@Titanium>
Permalink:  ../014701c40af5$4d6c6070$643b1cac@Titanium/
Also on:    postgresql.org/message-id/014701c40af5$4d6c6070$643b1cac@Titanium

 · 

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: vincentl@ntsp.nec.co.jp
  Subject: Re: odbc driver problem?  or threading? or crecordset?
  In-Reply-To: <014701c40af5$4d6c6070$643b1cac@Titanium>
  References: <014701c40af5$4d6c6070$643b1cac@Titanium>

* 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