Accessibility

Flash Article

Using the RDBMSResolver to Update a Database with Flash MX Professional 2004


Mark Rausch

Mark Rausch

Table of Contents

  1. Introduction
  2. The Basics
  3. Update Packets in Detail
  4. Result Packets in Detail
  5. A Sample Update Packet Parser
  6. Setting up the ColdFusion Component
  7. Building the Flash Application
  8. Summary

With the release of Macromedia Flash MX Data Connection Kit, Macromedia introduced the data-aware Firefly Components suite, which includes a DataSet component and plug-ins for connecting to various databases. Flash MX Professional 2004 includes updated versions of these components that work with databinding and take advantage of various Macromedia Flash Player enhancements.

In this article I show you how to build a complete Flash application that uses the DataSet, DataGrid, RDBMSResolver components together with a ColdFusion component to read data from an Access database, edit the data, and update the database. I also detail the format of the resolver's update and result packets and discuss how to build your own server functions to parse the XML, update the database, and construct a result packet.

Requirements

To complete this tutorial you will need to install the following software and files:

Macromedia Flash MX Professional 2004


Macromedia ColdFusion MX


Note: If ColdFusion MX is installed on a different machine than the one on which you build the Flash movie, you must place the proper IP address in the URL to access the component.

Flash Remoting MX for ColdFusion MX (Included with ColdFusion MX)

Flash Remoting MX Components for Flash MX Professional 2004 (Contains NetServices.as)

You should also be at least minimally familiar with creating and running Flash movies using Flash MX 2004.

Download sample files


Important security note: The sample ColdFusion component gives you the ability to run a query statement against any ColdFusion data source that you have set up on your machine. You should install it to the web root folder only within a development environment behind a secure firewall or on a computer that is not connected to the Internet. If you intend to use this component in a production environment you must take the necessary steps to secure it.




About the author

Mark Rausch is a member of the Macromedia Flash development team. Prior to coming to Macromedia as part of the CyberSage acquisition, Mark had been a consultant for 8 years. He focused on application development in Delphi and Java, using a variety of databases, including Oracle, SQL Server, and Interbase.