X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A00359DCA94 for ; Fri, 3 Mar 2006 00:20:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54538-01 for ; Fri, 3 Mar 2006 00:20:25 -0400 (AST) X-Greylist: whitelisted by SQLgrey- Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by postgresql.org (Postfix) with ESMTP id BDCB49DCA54 for ; Fri, 3 Mar 2006 00:20:24 -0400 (AST) Received: from [10.1.1.3] (203-214-81-94.dyn.iinet.net.au [203.214.81.94]) (authenticated sender pdonelan@optusnet.com.au) by mail13.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k234KLNo009426 for ; Fri, 3 Mar 2006 15:20:22 +1100 Message-ID: <4407C3F3.4050204@optusnet.com.au> Date: Fri, 03 Mar 2006 15:20:03 +1100 From: Patrick Donelan User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Visual Studio Query Builder filter References: <22CFEEFF5C5D60429D6B0572DB26625928F45F@iwsbsrv1.InterWorksok.com> In-Reply-To: <22CFEEFF5C5D60429D6B0572DB26625928F45F@iwsbsrv1.InterWorksok.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/10 X-Sequence-Number: 7296 Apologies if this is largely a Visual Studio 2005 question. I'm posting it here because I assume my problem is caused by the interaction between psqlODBC and Visual Studio. I'm using psqlODBC 8.01.02.00. When using the graphical Query Builder tool, you can specify a filter for your query. For example, if you specify the filter for table column x as " = sometext' then you get: WHERE x = 'sometext' in your query. All well and good if the column is of type text, but if the column is of type Boolean I can't figure out how to get the damn thing to accept my filter. For example: " = 't'" " = t" " = true" etc... all don't work, saying that the data is of the wrong type. Ok, so you're wondering why I don't just write my query the good old fashioned way? The problem is if the Query Builder doesn't like your query, it spits the dummy when it tries to generate the FillBy and GetBy queries needed to use VS 2005 TableAdaptors. The only workaround I've found so far is to create a dummy function that always returns true and use that in the filter, eg. " = alwaysTrue(12345)" Any ideas on how to get it to accept my filter as boolean so I don't have to use this workaround? Regards, Patrick