Database Connectivity


 

Step 3

 

Zinc™ v2 provides several ways of accessing the data in a result set. The first two methods, are both a "dump" of the result set contents. The only difference between the two is the format of the data. You can dump the data in a simple HTML 1.0 format or a simple XML format.

 

An alternative method is to target a specific field and row within the record set and obtain the result for that entry only.

 

On your main movie canvas, create two buttons. Underneath the buttons, create a Dynamic Text Box and label the var "dbResult":

 

tutorial_db_01

 

Select the first button, expand the Actionscript window and enter the following code:

 

 

       on (release) {

               dbResult = mdm.Database.MSAccess.getHTML();

       }

 

 

Select the second button and enter the following code in the Actionscript window:

 

 

       on (release) {

               dbResult = mdm.Database.MSAccess.getField(1, 1);

 

       }

 

 

In the above code, the first parameter is the Row Index within your Database table, and the second parameter is the Column Index.

 

Continue to Step 4