troubles on some Oracle field names
Francesco Sozzi
fsozzi at INTERCAD.CH
Thu Jan 20 09:56:43 PST 2005
Hi Fernando,
I've got sothing strange in writing sql statements into layer definition.
If I specifiy a field with words "anno_..." or "funzione_...", when I
attempt to run GetShape() I get an error into browser.
So, I prepared a simple example where I use these words into field synonyms
(but it is the same when these terms have been found into real field names).
Here you are a data definition where I use "anno_costruzione" as synonym of
fid: it gives error.
DATA "GEOM FROM (SELECT fid, geom, stato, numero, fid anno_costruzione FROM
ic_kuba_manufatti) USING UNIQUE FID"
Here you are a data definition where I use "anno2_costruzione" as synonym of
fid: it works fine.
DATA "GEOM FROM (SELECT fid, geom, stato, numero, fid anno2_costruzione FROM
ic_kuba_manufatti) USING UNIQUE FID"
Here you are code:
$layer->open();
echo "1<br>";
$result = $layer->getResult(0);
echo "2<br>";
$shape = $layer->getShape($result->tileindex,$result->shapeindex);
echo "3<br>";
$keyValue=$shape->values[$metadataLayerKey];
echo "4<br>";
$layer->close();
Here you are whate I get when I use "anno_costruzione".
1
2
Fatal error: [MapServer Error]: msOracleSpatialLayerGetShape(): Error:
ORA-00911: carattere non valido . Query statement: SELECT FID, STATO,
NUMERO, ANNO_COSTRUZIONE , GEOM FROM (SELECT fid, geom, stato, numero, fid
anno_costruzione FROM ic_kuba_manufatti) WHERE FID = 1512 .Check your data
statement. in C:\App\QueryMapWEB\runtime\qm\scripts\ic_php_map.inc on line
635
Please note that the characters " " does not stays into my mapfile.
If I use "anno2_costruzione" it works fine.
The same if I use some terms more (es: "funzione_...")
Best regards
Francesco
More information about the MapServer-users
mailing list