Accessibility
Jason Michael Perry

Jason Michael Perry

www.outthebox.net
www.jasonmperry.com

Table of Contents

Created:
15 March 2004
User Level:
Intermediate
Products:
Flashremoting

ADO.NET Connectivity with Macromedia Flash Remoting MX

As Macromedia moves Flash from an animation tool to a complex IDE for developing Rich Internet Applications, database connectivity and server-side processing are becoming more and more important. One way developers can interact with data in Flash is through Macromedia Flash Remoting, a middleware application through which Flash applications can access SQL and OLE databases using J2EE, .NET, ColdFusion, or XML and web services. After accessing this data, developers can manipulate the database results using a RecordSet, or they can bind this data directly to a Flash User Interface (UI) component like the DataGrid or ListBox components.

Flash Remoting for .NET lets Flash applications take advantage of the extensive ADO.NET database connectivity library. This means Flash applications can directly bind to a DataSet object and gain from the ADO.NET library's features.

Many web-based application languages that came before Flash, like ActiveX and Java Applets, have similar abilities. However, some advantages of Flash include its large design following, its speed, and its support for multiple back-end technologies.

In this article, you will learn how to use Flash Remoting to create database connections on a .NET web server with Flash Remoting through the creation of a Flash-based SQL query tool (see Figure 1). I will also provide a basic overview of binding database records to Flash UI components. You can also view a working example of this application at www.jasonmperry.com. For background on using Flash Remoting with ASP.NET, read my other Developer Center article, Introduction to Flash Remoting with .NET or my article on the O'Reilly website, Consuming Amazon with Flash Remoting.

SQL Query tool developed with Flash MX, Flash Remoting, and ASP.NET

Figure 1. SQL Query tool developed with Flash MX, Flash Remoting, and ASP.NET

(+) View larger

The Flash SQL Query tool (see Figure 1) provides an interface for running SQL commands against a Microsoft Access database. The resulting data result is displayed using Macromedia’s DataGrid component.

Requirements

This article explores database connectivity for Flash applications using ADO.NET and Flash Remoting. To complete this tutorial, you should have an intermediate knowledge of ActionScript and ASP.NET. You also need the following software installed:

Macromedia Flash MX Professional 2004

Macromedia Flash Remoting MX for .NET

Dreamweaver MX 2004 (or another ASP.NET development environment)

Tutorials and sample files:

Note: This tutorial uses the Northwind database that installs with Microsoft Access. It is not included in the ZIP file above, however, you can find it on your local machine or download it from Jason Michael Perry's website at www.jasonmperry.com/downloads/northwind.zip.

About the author

Jason Michael Perry is a partner in Out the Box Web Productions a Web-consulting and training firm whose clients include Michael Jackson, Pan-American Life, and the Small Business Exchange. Jason is also a Macromedia Team Member and a Macromedia Certified Instructor. For more information on Jason visit www.outthebox.net or www.jasonmperry.com. You can also e-mail Jason with any questions or comments at Jason@jasonmperry.com.