Page 1 of 1

Display sdo_geometry as text?

Posted: Wed 24 Oct 2007 13:50
by MarkF
Hi all!

I'd like to display an sdo_geometry value as text (instead of breaking each item into a different column the way the dataset seems to do by default. Is there any way to do this? SQLPlus shows an sdo_geometry field like this:

SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARRAY(1, 1, 5, 7))

Thanks for any help or suggestions!

-Mark Ford
Benthic Software

Posted: Thu 25 Oct 2007 07:41
by Plash
ODAC doesn't have such feature.

Posted: Thu 24 Jan 2008 14:37
by MarkF
Is there any way for me to handle sdo_geometry (or any object for that matter) myself? I'm using datasets and the object gets broken up into over 200 (I think) separate columns. I'd like to have it come back as a single field and then process the display myself. Is there a way to suppress the way that objects get broken out into separate fields?

Thanks for any suggestions!

-Mark Ford
Benthic Software

Posted: Thu 24 Jan 2008 15:06
by jfudickar
What about :

Code: Select all

ObjectView := False;
Greetings
Jens

Posted: Thu 24 Jan 2008 21:21
by MarkF
Hi Jens,

Thanks for the pointer! It looks like ObjectView has to be set to true to not expand the objects (so ObjectView set to the default, false, is what expands the objects.) I couldn't find it in the help files at all.

The real issue is that I actually like the ObjectView = False behavior for all objects except sdo_geometry (which expands to hundreds of fields.) I'd love to see an SDO_GeometryAsText option added.

-Mark

Posted: Fri 25 Jan 2008 02:18
by MarkF
Thanks against for the ObjectView suggestion! With ObjectView set to true and using GetObject and checking the ObjectType.Name I've managed to get a nice text representation of the SDO_Geometry object. The issue now is that I'd like to show other objects as text also. SQLPlus manages to take any object (or at least my simple tests) and give a text representation like:

PATIENT_OBJ(ID, LAST_NAME, FIRST_NAME)
--------------------------------------
PATIENT(1, 'Ford', 'Mark')

I'm new to working with TOraObject so I was just wondering if anyone has any suggestions, pointers, or code to help me out in turning generic Oracle objects into a string similar to above.

Thanks!

-Mark Ford