|Property Binding with a PostgreSQL Database [message #759804]
||Wed, 30 November 2011 02:20
| JB .
Registered: November 2011
I am passing user entered information (string) to a query that accesses a PostgreSQL database.
I have tried this by doing the following:
-in the Query window of the Data Set window typed the following:
select * from "Report_JobStatusReport"() where "ProjectManager" = ?
-created a report parameter and bound it to the Data Set parameter.
This method creates an error. I have however, been able to do this on a column that contain integers by providing an integer in the parameter.
I have created a solution that works by using Property Binding:
"select * from" + '"Report_JobStatusReport"' + "() where" + '"SalesOrder_ID"' + "=" + params["SalesOrder_ID_91"].value
where params["SalesOrder_ID_91"].value is a Report Value with an integer value of 91
"select * from" + '"Report_JobStatusReport"' + "() where" + '"ProjectManager"' + "=" + "'" + params["ProjectManager_Roger"].value + "'"
where params["ProjectManager_Roger"].value is a Report Value with a string value of Roger
Is there a more elegant way of doing this?
I had a lot of trouble getting this to work so I would like to be able to see what the SQL command looks like as it is passed to the database. Is this possible?
Powered by FUDForum
. Page generated in 0.04088 seconds