• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Integrating with .NET > .NET Web Service (Returning a Complex Type)

.NET Web Service (Returning a Complex Type)

Passing simple types between .NET and ColdFusion is useful, but in most real-world situations complex types provide benefits that seasoned ColdFusion developers have become accustomed to—such as querying a database and displaying results with a minimal amount of code. Whether you're a seasoned ColdFusion developer or not, the next example will have you retrieving .NET DataSet objects into ColdFusion and sending ColdFusion queries to .NET.

In this first example of a complex-type scenario, we will be querying a Microsoft Access database and storing the result in an ADO.NET DataSet. A DataSet object in its most complex form stores a memory-resident representation of a relational database; that is, a collection of tables including queried data from various data stores. DataSets work very similarly to storing multiple ColdFusion queries inside of a Structure. Our example will not be enforcing any referential integrity within the DataSet. We will be using the DataSet object to store two result sets from two different SQL SELECT statements. The end result of this example will be a ColdFusion Structure containing multiple queries. We will achieve this by parsing the resulting XML from the .NET Web service and storing the data as such.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint