Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 45FF89F9C36 for ; Fri, 14 Sep 2007 12:31:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 44808-06 for ; Fri, 14 Sep 2007 12:31:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id AC6D09F9BC3 for ; Fri, 14 Sep 2007 12:31:28 -0300 (ADT) Received: from [77.109.26.49] (77-109-26-49.dynamic.peoplenet.ua [77.109.26.49]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l8EFVKPd009831; Fri, 14 Sep 2007 08:31:23 -0700 Message-ID: <46EAA927.7060900@commandprompt.com> Date: Fri, 14 Sep 2007 18:30:47 +0300 From: Andrei Kovalevski User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Fred Parkinson CC: pgsql-odbc@postgresql.org Subject: Re: Way to reveal record locks? References: <46EA3277020000A700004CAC@groupwise.abag.ca.gov> In-Reply-To: <46EA3277020000A700004CAC@groupwise.abag.ca.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.1/4270/Fri Sep 14 00:29:48 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Fri, 14 Sep 2007 08:31:25 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/15 X-Sequence-Number: 9178 Hi! Fred Parkinson wrote: > I am using MS Access as a front end to a postgres database running on a Solaris Unix box, using odbc as the communication medium. > > One of the main tools of my Access app is a process that runs at night to process student progress in an online training system. > > A couple of nights ago the app started generating the error: > "Runtime error 3046: Could not save; currently locked by another user" > and it is on the app screen when I come in in the morning, locking up the program and keeping it from completing. I trap as many errors as I can think of, but this is escaping trap so I don't know where in the code it is happening. > > This error was not generated by PostgreSQL or ODBC driver. It belongs to the Visual Basic runtime processor: http://www.halfile.com/vb.html. > I am sure that the error is not from an Access user A. because the process runs between 11pm and 1am and 2. because there are no .ldb files open, a file type created when a user opens an access application. > How many Access users you have, may be someone accesses your data via remote desctop or something like that? > So, is there any way to determine what records are locked, if in fact that is the problem? (As you know, the error reported may not actually be the underlying problem). > > Most of the program is designed with classes instantiated as objects, and in Access when I take the 'debug' option of the error message box, all that happens is the program goes to the first process of the first object, so that is useless. > > If no one has an answer I will probably write a routine that steps through every record of every table and attempts to lock it to see if I can reproduce the error that way. > > Do you have Access tables inside your application or only linked PostgreSQL tables? May be it's not abou t PostgeSQL tables at all... Try to enable logging for ODBC driver or for the whole ODBC subsystem. It's possible to do via Administration -> Data Sources (ODBC) -> configure DSN or Tracing > Thanks in advance for any suggestions anyone may offer. > > Fred Parkinson > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > >