X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6D661D1DC72 for ; Tue, 16 Mar 2004 01:24:50 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 62786-08 for ; Mon, 15 Mar 2004 21:24:51 -0400 (AST) Received: from TYO202.gate.nec.co.jp (TYO202.gate.nec.co.jp [210.143.35.52]) by svr1.postgresql.org (Postfix) with ESMTP id 840C0D1CCD1 for ; Mon, 15 Mar 2004 21:24:46 -0400 (AST) Received: from mailgate4.nec.co.jp (mailgate53.nec.co.jp [10.7.69.184]) by TYO202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i2G1Oke18207 for ; Tue, 16 Mar 2004 10:24:46 +0900 (JST) Received: (from root@localhost) by mailgate4.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i2G1OkG08839 for pgsql-odbc@postgresql.org; Tue, 16 Mar 2004 10:24:46 +0900 (JST) Received: from fireball.ntsp.nec.co.jp (postfix@[172.28.58.1]) by isgw1.nec.co.jp (8.11.7/3.7W-ISGW-NEC) with ESMTP id i2G1Oi023451 for ; Tue, 16 Mar 2004 10:24:45 +0900 (JST) Received: from the-one (localhost [127.0.0.1]) by fireball.ntsp.nec.co.jp (Postfix) with ESMTP id 0705A29B0D for ; Tue, 16 Mar 2004 09:20:24 +0800 (HKT) Received: from 172.28.58.4 ([172.28.58.4] helo=galadriel.ntsp.nec.co.jp) by the-one ; 16 Mar 04 01:20:23 -0000 Received: from hq.ntsp.nec.co.jp (frytrix.hq.ntsp.nec.co.jp [172.28.58.129]) by galadriel.ntsp.nec.co.jp (Postfix) with ESMTP id 3F7C94020C for ; Tue, 16 Mar 2004 09:23:31 +0800 (PHT) Received: (from smtp@localhost) by hq.ntsp.nec.co.jp (8.9.2/8.9.2) id JAA09389 for ; Tue, 16 Mar 2004 09:01:35 +0800 (HKT) Received: from UNKNOWN(172.28.59.100), claiming to be "Titanium" via SMTP by frytrix, id smtpdAAA0MdmwZ; Tue Mar 16 01:01:35 2004 From: "Vincent Ladlad" To: Subject: odbc driver problem? or threading? or crecordset? Date: Tue, 16 Mar 2004 09:23:35 +0800 Message-ID: <014701c40af5$4d6c6070$643b1cac@Titanium> MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/57 X-Sequence-Number: 3859 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