Skip to main content
Participating Frequently
August 6, 2011
Answered

Spry dataset and SQL Database - will it work?

  • August 6, 2011
  • 1 reply
  • 923 views

In Dreamweaver, there is an option to insert a spry dataset, but it only accepts html or xml. That doesn't help if my data is in a database.

I can't find any information to make it work with a database.

Please point me to an article or tell me I'm wasting my time trying to figure it out.

    This topic has been closed for replies.
    Correct answer existdissolve

    Spry data sets can also be built from JSON. Whichever data format you use, however, you're going to have to have some mechanism to get the data from your database (on the server side) into the format you want to use (on the client side), such as returning a query from a CFC and converting it to JSON or XML via AJAX.

    I'd start by looking at the examples that Spry has for datasets:

    http://labs.adobe.com/technologies/spry/samples/index.html

    And be sure to check out the examples that Spry has of retrieving data in the proper format in a variety of languages:

    http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html

    1 reply

    existdissolve
    existdissolveCorrect answer
    Inspiring
    August 6, 2011

    Spry data sets can also be built from JSON. Whichever data format you use, however, you're going to have to have some mechanism to get the data from your database (on the server side) into the format you want to use (on the client side), such as returning a query from a CFC and converting it to JSON or XML via AJAX.

    I'd start by looking at the examples that Spry has for datasets:

    http://labs.adobe.com/technologies/spry/samples/index.html

    And be sure to check out the examples that Spry has of retrieving data in the proper format in a variety of languages:

    http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html

    Participating Frequently
    August 7, 2011

    Is there an article that tells how to use the returned xml as the datasource and make it work?

    Participating Frequently
    August 7, 2011

    I figured it out.

    The xml output wasn't valid because it had whitespace before the declaration. Coldfusion has to be set to enable whitespace management.