Eric, Could you try a OCI connection string like:
"OCI:user/passw...@host/SID" Alan On February 12, 2010 04:18:23 am Eric Wolf wrote: > I'm using GDAL/OGR 1.6.1 with ActivePython 2.6.4-10 and > cx_Oracle-5.0.3-11g. I am trying to connect to an Oracle 11g instance. > > This works: > > ogr2ogr -f "KML" emp.kml OCI:scott/tiger "EMP" > > What am I doing wrong. This fails, ds is None: > > from osgeo import ogr > > try: > d = ogr.GetDriverByName('OCI') > except: > print "Unable to GetDriverByName" > quit() > > ds = None > > try: > ds = ogr.Open('OCI:scott/tiger') > except: > print "Unable to open OCI connection" > quit() > > if ds is None: > print "Unable to open Oracle connection", ds > quit() > > lyr = ds.GetLayerByName('EMP') > number = lyr.GetFeatureCount() > > print "Features: " + str(number) > > > > > -=--=---=----=----=---=--=-=--=---=----=---=--=-=- > Eric B. Wolf New! 720-334-7734 > USGS Geographer > Center of Excellence in GIScience > PhD Student > CU-Boulder - Geography > > GPG Public Key: http://www.h4h.net/ebwolf.public.key.txt > -- Alan Boudreault Mapgears http://www.mapgears.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev