Dienstag, 8. Mai 2012

xcopy ODP.NET with Oracle Spatial

Up to now, ODP.NET was not an option for production use because of
  • non-automated deployment
  • incompatibility to other Oracle Clients on the target machine
  • AnyCPU was difficult, etc.
However, one of the few advantages compared to obsolete Microsoft Provider is that you use Custom Type Mapping to enable Oracle Spatial. Oh my, why did Oracle make it so hard for us .NET guys to use their software. In Java, it's all so easy.

But wait! Here is a trick how to do a lightweight xcopy-deployment of ODP.NET with Instant Client.

I uploaded a sample app on hello.ODPSpatial which implements SdoPoint, SdoGeometry and StGeometry. Beside an Instant Client (Basic Lite) you need the .NET Assembly Oracle.DataAccess and the native OraOps11w.dll (~1.4 MB).

Here is a screenshot of the sample application: