Hi Bryan,
        I just figured something out that I think has been a problem for the
CF community for a while, or at least, I didn't know there was a fix for
this problem.  I think this will help you out a lot.

        I just now wrote a CF web service that returns a query.  I then
created a proxy service in .NET that refers to the CF webservice.  What I
noticed was that the datatype the webservice returns to .NET is called a
Querybean.  The Querybean contains two properties - columnList and data.

        Querybean.columnList is an array of strings that, obviously,
contains the list of columns in the dataset.  Here's an example of
displaying the column names.

foreach (string S in Q.columnList)
{
        Response.Write("Column: " + S + "<br>");
}

The second property, Querybean.data, happens to be an array of arrays.  The
outer array is a row, while the inner array represents a field in that row.

Each array contains generic "objects", but each must be cast differently in
order to read them.

Here's an example of displaying the data:

foreach (object O in Q.data)
{
        foreach (object P in (System.Array) O)
        {
                Response.Write (P.ToString() + "<br>");
        }
}


All this means is that is it possible to pass a query directly from
ColdFusion to .NET without any intermediary steps, such as converting to
XML.

I'm going to write a small .NET class that will allow you to pass in a
Querybean and it will return a Datatable object, hopefully with datatypes
included.

Does this help anybody else out there?  I think I may be also able to
determine how to interpret complex objects passed from CF.

- Matt Small

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 04, 2005 2:48 PM
To: CF-Talk
Subject: Re: CF webservice consumed via .NET

BINGO! Matt....that would do the trick.  The bummer is I can't use it given 
the application structure I'm working with....but for the future...that 
would work nicely (like the very next project).

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:223275
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