sdo_geometry problem
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: sdo_geometry problem

  1. #1
    Join Date
    Nov 2009
    Posts
    2

    sdo_geometry problem

    Hi,

    I use Visual Studio's COM library Oracle InProc Server 3.0 and oracle 8.1 but I can not get sdo element info:

    string sql = "SELECT * FROM GEOMTABLE WHERE ROWNUM <=5";
    object obj = new object();
    object index = new object();
    int dType = 0;
    bool err = false;
    string value = "";
    int size = 0;

    OracleInProcServer.OraSession oraDBSession = (OracleInProcServer.OraSession)new OracleInProcServer.OraSessionClassClass();
    OracleInProcServer.OraDatabase oraDB = (OracleInProcServer.OraDatabase)oraDBSession.get_OpenDatabase(this.dbName, this.userInfo, 0);
    OracleInProcServer.OraDynaset dynSet = (OracleInProcServer.OraDynaset)oraDB.get_CreateDynaset(sql, 0, ref obj);
    OracleInProcServer.OraObject oraObj;
    OracleInProcServer.OraFields oraFs;
    OracleInProcServer.OraField oraF;

    while (!dynSet.EOF)
    {
    oraFs = (OracleInProcServer.OraFields)dynSet.Fields;
    oraF = (OracleInProcServer.OraField) oraFs ["GEOM_COLUMN"];
    oraObj = (OracleInProcServer.OraObject)oraF.Value;
    ...

    dynSet.MoveNext();
    }

    I could get all data types (numeric, varchar ...) by this C# code however I could not get sdo_geometry type(in the example: GEOM_COLUMN).
    How can I get sdo element info from oraObj?

    Lots of Greetings!
    Ahmad

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    What's the Oracle data type of the offending column? is it a LOB?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Nov 2009
    Posts
    2
    Thank you for your reply.

    The data type of this column is SDO_GEOMETRY.

    Default value of column is MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(0,0,0),NULL,NULL)

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    SDO_GEOMETRY? sdo_geometry is an spacial object/type/collection of methods which indeed relies on a couple of LOBs to store part of the data.

    You may want to research sdo_geometry's GET_WKT() and GET_WKB() functions.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width