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

hanko hana.jaborova at spatialtechnology.se
Thu Jun 10 07:26:31 EDT 2010


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.


More information about the fdo-users mailing list