SeQueryInfo info = new SeQueryInfo();
info.setColumns(new String[]{"OBJECTID","PICTURE","DEPTNAME3","SHAPE"});
SeSqlConstruct sqlConstruct = new SeSqlConstruct();
sqlConstruct.setTables(new String[]{seLayer.getName()});
sqlConstruct.setWhere(" OBJECTID > 600 "); info.setConstruct(sqlConstruct);
info.setByClause(" GROUP BY DEPTNAME3 ");
SeQuery seQuery = new SeQuery(seCon,new String[]{"OBJECTID","PICTURE","DEPTNAME3","SHAPE"},sqlConstruct);
SeCoordinateReference cr = seLayer.getCoordRef();
SeShape inputShape = new SeShape(cr);
inputShape.generateFromText("POLYGON((195930.27713044552 214575.8701973,195907.22848852084 214706.58554121433,195840.86256912464 214821.5346854996,195739.18408159274 214906.85306688625,195614.45695213618 214952.2500294139,195481.7251133438 214952.2500294139,195356.99798388724 214906.85306688625,195255.31949635534 214821.5346854996,195188.95357695915 214706.58554121433,195165.90493503446 214575.8701973,195188.95357695915 214445.1548533857,195255.31949635534 214330.20570910044,195356.99798388724 214244.88732771378,195481.7251133438 214199.49036518612,195614.45695213618 214199.49036518612,195739.18408159274 214244.88732771378,195840.86256912464 214330.20570910044,195907.22848852084 214445.1548533857,195930.27713044552 214575.8701973))");
SeFilter filter = new SeShapeFilter(seLayer.getName(), seLayer.getSpatialColumn(), inputShape, SeShapeFilter.METHOD_AI);
System.out.println(""+System.currentTimeMillis()+" " + new Date(System.currentTimeMillis()).toLocaleString());
seQuery.setSpatialConstraints(SeQuery.SE_SPATIAL_FIRST, true, new SeFilter[]{filter});
info.setQueryType(SeQueryInfo.SE_QUERYTYPE_ATTRIBUTE_FIRST);
SeRow row = seQuery.fetch() ;
when recieve the last line. throws the exception
ArcSDE Error Number : -51
Error Description : DATABASE LEVEL ERROR OCCURRED.
Extended Error Description :
com.esri.sde.sdk.client.SeException:
at com.esri.sde.sdk.client.k.v(Unknown Source)
at com.esri.sde.sdk.client.k.d(Unknown Source)
at com.esri.sde.sdk.client.SeQuery.fetch(Unknown Source)
at com.augurit.Test.main(Test.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Process finished with exit code 0
How do I use right ? please help me. thanks