Ecommerce, mp3, asp and sql, how's it done?

Hi all, this is my first time here. I have to say this site rocks!!! Anywho…

I have an ecommerce site that is based on ASP with Microsoft SQL database. It sells music and I’m trying to work out how you do this: http://www.soundshopper.com/royalty-free-music-urban-grooves-jazz-hiphop.html

I have an asp page with a repeating region. I can get my mp3 player to show if there is an mp3 file stored in the database record and I have managed to pass the file name and ProductID through to the mp3 player as variables. As the records repeat down the asp page it loads the mp3 player into the repeating region where a file name exists in the database but of course, as its only loading another instance of the same flash file it just loads the same record. I have two variables in my flash movie, one called song which holds the mp3 file name to be played and one called prodID which holds the productID number.

Is it possible to to use the prodID variable to tell the flash movie what row in the database to get the mp3 file name from and then set the result as the variable song?

Here’s my asp page:

<<A href=“mailto:%@LANGUAGE=“JAVASCRIPT”>%@LANGUAGE=“JAVASCRIPT” CODEPAGE=“1252”%>
<!–#include file=”…/…/Connections/AlbumsSQL.asp" -->
<%
var songname = Server.CreateObject(“ADODB.Recordset”);
songname.ActiveConnection = MM_AlbumsSQL_STRING;
songname.Source = “SELECT SamplesID, Samples, ProductID FROM dbo.Products WHERE SamplesID = 1 ORDER BY ProductID DESC”;
songname.CursorType = 0;
songname.CursorLocation = 2;
songname.LockType = 1;
songname.Open();
var songname_numRows = 0;
%>
<%
var songpath = (“samples/” + (songname.Fields.Item(“Samples”).Value))
var prodID = (songname.Fields.Item(“ProductID”).Value)
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 1;
songname_numRows += Repeat1__numRows;

%>
<html>
<%if (!songname.EOF || songname.BOF) { %>
<% while ((Repeat1__numRows-- != 0) && (!songname.EOF)) { %>
<table width=“902” border=“0” cellspacing=“0” cellpadding=“0”>
<tr>
<td width=“212”><%
Response.Write ("&songpath=" + songpath);
Response.Write ("&prodID=" + (songname.Fields.Item(“ProductID”).Value));
%></td>
<td width=“254”> </td>
<td width=“218”> </td>
<td width=“218”>  </td>
</tr>
</table>
<%
Repeat1__index++;
songname.MoveNext();
}
%>
<%
} // end !songs.EOF || !songs.BOF
%>
</html>
<%
songname.Close();
%>

OR,

Dose anyone know of a system or tutorial that shows how this is done?

Sorry if this is a bad explanation of what I need.

Cheers :slight_smile: