[fdo-users] Re: Number of geometry types in Oracle FeatureClass

Haris Kurtagic haris at sl-king.com
Thu Jun 10 07:52:03 EDT 2010


oh, I see now 2 sql's
second one will not work anyhow, first one looks like it should

Haris


On Thu, Jun 10, 2010 at 1:42 PM, Haris Kurtagic <haris at sl-king.com> wrote:
> Hm, from error itself looks like some issue with provider
> but looking into your code sample you used fdo class name instead of
> Oracle table name (execute sql will execute sql exactly as you wrote
> it).
> It looks like, error code  doesn't match sample sql you put in email
> sql in email is the one you used it ?
>
> Haris
>
> On Thu, Jun 10, 2010 at 1:26 PM, hanko
> <hana.jaborova at spatialtechnology.se> wrote:
>>
>> Hi,
>>
>> A Good advice is worth gold
>>
>> I have already tried use SQL statement command in FDO. I cannot get it work.
>> I would appreciate a working code example.
>>
>> public void SQLQuery()
>> {
>>        // create the command
>>        ISQLCommand sqlCommand =
>> (ISQLCommand)FDOConnection.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_SQLCommand);
>>        int count = 0;
>>
>>        sql = "SELECT COUNT(1) AS CONT FROM MYTABLE t  WHERE t.GEOMETRY.sdo_gtype
>> IN (2001,3001,2005,3005)";
>>        //or
>>        sql = "SELECT COUNT(1) AS CONT FROM KingOra:MYSCHEMA~MYTABLE~GEOMETRY t
>> WHERE t.GEOMETRY.sdo_gtype IN (2001,3001,2005,3005)";
>>        sqlCommand.SQLStatement = sql;
>>        try
>>        {
>>                count = sqlCommand.ExecuteNonQuery();
>>                //ISQLDataReader dataReader = sqlCommand.ExecuteReader();
>>        }
>>        catch (OSGeo.FDO.Common.Exception ex)
>>        {
>>                System.Console.WriteLine(ex.Message +" " + ex.InnerException);
>>        }
>> }
>> Exception: "ora-24374 define not done before fetch or execute and fetch"
>> Cheers
>>
>> Hanko
>> --
>> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Number-of-geometry-types-in-Oracle-FeatureClass-tp5161882p5162697.html
>> Sent from the FDO Users mailing list archive at Nabble.com.
>> _______________________________________________
>> fdo-users mailing list
>> fdo-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>
>


More information about the fdo-users mailing list