Hi
I'm having problem with binding parameter in native sql query, using 
PostGIS features.
I have table drawing with column 'shap' wich is Geometry type. I want to 
select only drawings which intersects a given rectangle, so I have a 
query like this:

SELECT * FROM drawings dr WHERE ST_Intersect(dr.shape, 'POLYGON((:llx 
:lly, :lux :luy, :rux :ruy, :rlx :rly, :llx :lly))';

When I try to bind a parameter to :llx (and any other also) I get 
ArgumentExcpetion:
Parameter lux does not exist as a named parameter in [SELECT * FROM 
drawings dr WHERE ST_Intersect(dr.shape, 'POLYGON((:llx :lly, :lux :luy, 
:rux :ruy, :rlx :rly, :llx :lly))' ]

I'm using Npgsql2.0. I remeber there was simmilar problem with beta 
version of Npgsql2, but it was eliminated in final release, and above 
code works fine with plain Npgsql2. My version of Castle is a build from 
1021 version.
Thanks in advanced
Mike

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to