Page 1 of 1

Oracle ADT to MySQL

Posted: Mon 23 Mar 2009 05:04
by hardstyleuk
Hi, I'm attempting to port data from Oracle to MySQL using both of the Devart products. I have having difficulty porting Oracle's ADT data type into an appropriate MySQL field. I am using the LoadFromDataset to do the transfer.

Could someone please point me in the right direction for getting the Oracle data into MySQL.

Thanks.

Posted: Mon 23 Mar 2009 09:07
by Plash
If your TOraQuery component has the ObjectView property set to False, there is one field for each member of OBJECT field.
You can create a MySQL table with such fields, and use the TMyLoader component to load data.

Posted: Tue 24 Mar 2009 00:07
by hardstyleuk
The TOraQuery.ObjectView is set to False however the ADT fields are still only coming in as a single field. I have tried setting this property to True, but still no result.

The ADT fields contain spatial data and I have been able to get the TMyLoader to load the data as blob fields, however, I now don't know how to access the blob data to get my co-ordinates.

What am I doing wrong here?

Posted: Wed 25 Mar 2009 09:27
by Plash
If you are using SDO_GEOMERTY data type, you can use its methods Get_WKB or Get_WKT to convert a value to BLOB or CLOB (supported starting with Oracle 10). For example:

SELECT t.id, t.geom_field.Get_WKB() FROM geom_table t