Hi I'm having problem with binding parameter in native sql query, using PostGIS features (used from ActiveRecord). I have table drawing with column 'shape' which 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. Also above code works fine with plain Npgsql2. My version of Castle is a build from 1021 version (with NHibernate 2.1). Any idea is it a feature or a bug? ;) Thanks in advanced Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
