I am not an expert with npgsql , but I think your parameterized query could work like this:
UPDATE raw.geocoding SET the_geom = ST_Transform(ST_GeomFromText(:mygeom, 4326), 3081) WHERE id = :id
And mygeom will contain this line:
POINT(96.6864379495382 32.792527154088)
.. preassembled from your other variables. The result will be a query like this:
UPDATE raw.geocoding SET the_geom = ST_Transform(ST_GeomFromText( (E'POINT(96.6864379495382 32.792527154088)')::text, 4326),3081) WHERE id=((10793455)::int4)
What should work.
If you are having trouble assembling the string (as your comment shows), there is a more elegant way. As @Paul hinted at my previous answer , PostGIS provides a dedicated function for this purpose:
ST_MakePoint(double precision x, double precision y)
Details in the manual . In doing so, we finally achieve:
UPDATE raw.geocoding SET the_geom = ST_Transform(ST_SetSRID( ST_MakePoint(:longitude, :latitude), 4326), 3081) WHERE id = :id
Pay attention to the comma. Will he finally work now?
If not, just beat him with a sledgehammer. GRML
Now it is ST_SetSRID() instead of ST_GeomFromText() . See Comment.