X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5D73D9FA19B for ; Fri, 19 May 2006 02:23:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 41808-06 for ; Fri, 19 May 2006 02:23:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id 90C5F9FA176 for ; Fri, 19 May 2006 02:23:06 -0300 (ADT) Received: from localhost (mx1.hub.org [200.46.208.251]) by pgfoundry.org (Postfix) with ESMTP id 7D69186C4DB; Fri, 19 May 2006 05:23:06 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 34868-10; Fri, 19 May 2006 02:23:01 -0300 (ADT) Received: by pgfoundry.org (Postfix, from userid 80) id 9735586C4DC; Fri, 19 May 2006 05:23:01 +0000 (UTC) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1000648 ] Visual Studio 2005 DataSet Designer "Add Query..." wizard fails with a syntax error if SELECT query contains a WHERE clause Content-type: text/plain; charset=UTF-8 Message-Id: <20060519052301.9735586C4DC@pgfoundry.org> Date: Fri, 19 May 2006 05:23:01 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/41 X-Sequence-Number: 7712 Bugs item #1000648, was opened at 2006-05-19 05:23 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000648&group_id=1000125 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Patrick Donelan (patspam) Assigned to: Nobody (None) Summary: Visual Studio 2005 DataSet Designer "Add Query..." wizard fails with a syntax error if SELECT query contains a WHERE clause Initial Comment: Hi, I'm using the latest version of the drivers: 8.02.00.02 and PostgreSQL 8.1 on Windows XP Pro. When adding simple queries to TableAdapters in Visual Studio 2005 using the DataSet Designer, a simple WHERE clause causes the Add Query wizard to fail with a syntax error, even though the query executes perfectly if you test it during an intermediate Wizard step. Simple Steps To Reproduce ------------------------- 1. Open an existing DataSet in the DataSet Designer (or create a new one) 2. Add a TableAdapter, with a simple query (in my case "SELECT * FROM agent") 3. Add a Query to the TableAdapter: Right-click on TableAdapter > Add Query.. > Use SQL statements > SELECT which returns rows 4. Type in a simple SELECT using a single WHERE clause (in my case "SELECT * from agent WHERE (agent_id = ?)") 5. Click Query Builder.. > Execute Query (prompts for Query Parameter and executes perfectly) 6. Click OK > Next > Next (leave "Fill a DataTable" and "Return a DataTable" checked) > Next At this point, even though the query executed perfectly in the Query Builder, you get an error: "The wizard detected the following problems when configuring TableAdapter query "FillBy": Details: Generated SELECT statement. ERROR [42601] ERROR: syntax error at or near ")"; Error while executing the query" I have found a partial workaround: 1. Use the Wizard to create the query (with WHERE clause omitted) 2. Right-click on the new query and select properties 3. Modify the query in the CommandText property window Logs attached. Regards, Patrick ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000648&group_id=1000125