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 A4E4252989 for ; Sun, 17 Jul 2005 04:51:05 -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 25790-05 for ; Sun, 17 Jul 2005 07:51:03 +0000 (GMT) Received: from Mail2.KONTENT.De (mail2.kontent.de [81.88.34.59]) by svr1.postgresql.org (Postfix) with ESMTP id 4284952982 for ; Sun, 17 Jul 2005 04:51:01 -0300 (ADT) Received: from jedi.behrens.de (p50858D35.dip0.t-ipconnect.de [80.133.141.53]) by Mail2.KONTENT.De (Postfix) with ESMTP id 0ADBA388084 for ; Sun, 17 Jul 2005 09:51:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by jedi.behrens.de (Postfix) with ESMTP id 236B11CB35 for ; Sun, 17 Jul 2005 09:51:01 +0200 (CEST) Received: from jedi.behrens.de ([127.0.0.1]) by localhost (jedi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31468-07 for ; Sun, 17 Jul 2005 09:51:01 +0200 (CEST) Received: from anakin (anakin.behrens.de [192.168.150.240]) by jedi.behrens.de (Postfix) with ESMTP id EA61119AA7 for ; Sun, 17 Jul 2005 09:51:00 +0200 (CEST) From: lothar.behrens@lollisoft.de To: pgsql-odbc@postgresql.org Date: Sun, 17 Jul 2005 09:47:07 +0200 MIME-Version: 1.0 Subject: Best way of retrieving tablename from a query ? Message-ID: <42DA291B.7581.89AC3B@localhost> X-mailer: Pegasus Mail for Windows (4.21c, DE v4.21c R1a) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.228 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200507/73 X-Sequence-Number: 5539 Hi, I have implemented a function to retrieve the table name from a SQL query = by analysing the SQL query string. Now I tried to use the SQLColumns to do this, because avoiding special han= dling of joined or multible tables in a query. The orginal sample code uses an uninitialized hstmt in it's call, so I ass= umed, it must be the statement, that I have created from the orginal query to retrieve the tabl= e from. Is this correct, or is there a better way to do this ? Thanks Lothar -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 | 40235 D=FCsseldorf | www.lollisoft.de