You might be able to create a view that returns your objects as XML
somehow.  I built a view that returns regular table fileds as XML once
as POC.  Here is what it looked like...using Oracle 9i

CREATE OR REPLACE FORCE VIEW DKNUDSEN.EMP_VIEW
OF SYS.XMLTYPE
WITH OBJECT IDENTIFIER (EXTRACT(sys_nc_rowinfo$,'/Emp/@empno').getnumberval())
AS 
SELECT XMLELEMENT("Emp", XMLAttributes(empno),
            XMLForest(e.fname ||' '|| e.lname AS "name",
                       e.hire AS "hiredate")) AS "result"
          FROM emp e;

HTH.

Doug


On Wed, 26 Jan 2005 13:21:59 -0500, Adrocknaphobia
<[EMAIL PROTECTED]> wrote:
> Well, I'm pretty sure you are SoL. I seriously doubt the dataDirect
> drivers will convert your objects into CF structures within a CFquery
> recordset.
> 
> I have always just referenced each property in SQL like so:
> 
> SELECT nameObj.first_name AS first_name, nameObj.last_name AS
> last_name, nameObj.title AS title
> FROM empTable
> 
> -Adam
> 
> 
> On Wed, 26 Jan 2005 11:51:12 -0500, Ryan Scott <[EMAIL PROTECTED]> wrote:
> > Yes, I would like to be able to access the collection of employees
> > within each department.
> >
> > Ryan
> >
> > On Wed, 26 Jan 2005 11:41:54 -0500, Adrocknaphobia
> > <[EMAIL PROTECTED]> wrote:
> > > Are you expecting to return the full object to CF?
> > >
> > > -Adam
> > >
> > >
> > > On Wed, 26 Jan 2005 11:17:16 -0500, Ryan Scott <[EMAIL PROTECTED]> wrote:
> > > > When I run the following query
> > > >
> > > > <cfquery datasource="Test"  name="objectView">
> > > >  select departmentcode, emp_list from dept_view
> > > > </cfquery>
> > > >
> > > > against an oracle object view which returns a collection of employee
> > > > object types within a department:
> > > >
> > > > dept_code, dept_name, employees.
> > > >
> > > > using the DataDirect JDBC Drivers I get the following error:
> > > >
> > > > [Macromedia][Oracle JDBC Driver][Oracle]ORA-00932: inconsistent
> > > > datatypes: expected NUMBER got RYSCOTT.EMPLOYEES_T
> > > >
> > > > When I change the driver to the oracle thin driver I get this as output:
> > > >
> > > > A00060 class [Ljava.lang.Object; F00245 class
> > > > where A00060 is the department code and [Ljava.lang.Object is I am
> > > > guess the Employee Object.
> > > >
> > > > If I try and use a jdbc driver within CFSCRIPT:
> > > >
> > > > dsService = CreateObject("java",
> > > > "coldfusion.server.ServiceFactory").DataSourceService;
> > > > l_datasource= dsManager.getDataSource('<oracle_thin_driver>')
> > > > conn = l_datasource.getConnection()
> > > > ps = conn.prepareStatement("Select * from dept_view");
> > > > ps.executeQuery();
> > > >
> > > >  conn.close();
> > > >
> > > > I get this error
> > > >
> > > > [Macromedia][Oracle JDBC Driver][Oracle]ORA-00932: inconsistent
> > > > datatypes: expected NUMBER got RYSCOTT.EMPLOYEES_T
> > > >
> > > > even though I have used the oracle thin drivers.
> > > >
> > > > Has anyone been able to query an object view from within coldfusion mx?
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191865
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to