From: | <noreply(at)pgfoundry(dot)org> |
---|---|
To: | noreply(at)pgfoundry(dot)org |
Subject: | [ psqlodbc-Bugs-1000648 ] Visual Studio 2005 DataSet Designer & amp; quot; Add Query...& amp; quot; wizard fails with a syntax error if SELECT query contains a WHERE clause |
Date: | 2006-05-24 13:29:24 |
Message-ID: | 20060524132924.4AC9D86C512@pgfoundry.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
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: Closed
Resolution: None
Priority: 3
Submitted By: Patrick Donelan (patspam)
Assigned to: Hiroshi Inoue (hinoue)
Summary: Visual Studio 2005 DataSet Designer &amp;quot;Add Query...&amp;quot; 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
----------------------------------------------------------------------
Comment By: Patrick Donelan (patspam)
Date: 2006-05-24 09:15
Message:
Works perfectly with the latest dll.
Many thanks as always Hiroshi, I take my hat off to you!
Patrick
----------------------------------------------------------------------
Comment By: Hiroshi Inoue (hinoue)
Date: 2006-05-20 07:54
Message:
Please try the latest dll at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
.
regards,
Hiroshi Inoue
----------------------------------------------------------------------
Comment By: Patrick Donelan (patspam)
Date: 2006-05-20 04:40
Message:
With Server side prepare on, the error in Visual Studio becomes:
ERROR [HY000] Can't get column attributes: no result found.
New logs are attached.
Regards,
Patrick
----------------------------------------------------------------------
Comment By: Hiroshi Inoue (hinoue)
Date: 2006-05-19 12:03
Message:
Could you turn on Server side prepare option ?
regards,
Hiroshi Inoue
----------------------------------------------------------------------
Comment By: Patrick Donelan (patspam)
Date: 2006-05-19 05:36
Message:
May or may not be useful, but I've just noticed that the
error message also appears in PostgreSQL 8.1's error log:
ERROR: syntax error at or near ")" at character 39
Patrick
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000648&group_id=1000125
From | Date | Subject | |
---|---|---|---|
Next Message | Sistemas C.M.P. | 2006-05-26 13:39:01 | Unknown error |
Previous Message | Glauco Mancini | 2006-05-24 09:44:31 | information request on postgresql --> oracle connect via odbc |