[ psqlodbc-Bugs-1000648 ] Visual Studio 2005 DataSet Designer "Add Query..." wizard fails
am 19.05.2006 07:23:01 von noreplyBugs item #1000648, was opened at 2006-05-19 05:23
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10006 48&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=10006 48&group_id=1000125
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match