X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 18413D1B2E0 for ; Sun, 18 Jul 2004 23:53:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89574-10 for ; Mon, 19 Jul 2004 02:53:50 +0000 (GMT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by svr1.postgresql.org (Postfix) with ESMTP id 0AF28D1B23E for ; Sun, 18 Jul 2004 23:53:44 -0300 (ADT) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BmOHh-0000OS-00 for ; Mon, 19 Jul 2004 04:53:48 +0200 Received: from 24-151-240-198.chartertn.net ([24.151.240.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Jul 2004 04:53:45 +0200 Received: from dbase4 by 24-151-240-198.chartertn.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Jul 2004 04:53:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-odbc@postgresql.org From: "David P. Lurie" Subject: error with access 2003 - column "ctid" does not exist Date: Sun, 18 Jul 2004 22:54:46 -0400 Lines: 67 Message-ID: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 24-151-240-198.chartertn.net X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=PRIORITY_NO_NAME, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/83 X-Sequence-Number: 4216 Access 2003 psqlodbc 7.03.02 postgresql 7.4.3 (cygwin) I can successfully use tables and views as linked tables in access. Views can be updated with access forms after writing appropriate update, delete and insert rules for each view. ADO pass-through queries will be needed for some reports, in order to pass runtime parameters. A test subroutine to create an ADO recordset for a pass-through query on a view fails on recordset open with the error: column "ctid" does not exist. Substitution of the SQL statement used to create the view runs without error. The docs list ctid as a system column with the current location of the row. The same problem occurs with single or multitable views. Is there something additional needed to access a view via ADO, or is this a limitation of the odbc driver? The test subroutine follows; I just comment out one of the two recordset open statements before execution. The mailing list will likely break up the query string assignment statement into multiple lines. It should just be two lines, with a continuation character at the end of the first line: Sub TestODBC() Dim cnn1 As New ADODB.Connection Dim rst1 As New ADODB.Recordset Dim strqry As String 'Open recordset cnn1.Open "Provider=MSDASQL;DSN=PostgreSQL30;database=emr;UID=postgres;" Set rst1 = New ADODB.Recordset rst1.CursorType = adOpenDynamic rst1.LockType = adLockOptimistic rst1.CursorLocation = adUseServer strqry = "SELECT (patients.acctmaj::text || patients.acctmin::text)::character varying AS acctnum, patients.acctmaj, patients.acctmin, patients.lastname, patients.firstname, patients.middleinit, allergies.allergiesid, allergies.drug, allergies.reaction, allergies.comment" & _ " FROM public.patients JOIN public.allergies ON patients.acctmaj::text = allergies.acctmaj::text AND patients.acctmin::text = allergies.acctmin::text ORDER BY (patients.acctmaj::text || patients.acctmin::text)::character varying, allergies.drug;" rst1.Open strqry, cnn1 'rst1.Open "select * from public.vwpatientallergies", cnn1 Do Until rst1.EOF Debug.Print rst1.Fields(3).Value, rst1.Fields(4).Value, rst1.Fields(5).Value, rst1.Fields(7).Value, rst1.Fields(8).Value, rst1.Fields(9).Value, vbNewLine rst1.MoveNext Loop End Sub