# \[Flash & ASP\] LoadVariables problem

**URL:** <https://forum.kirupa.com/t/flash-asp-loadvariables-problem/67374>\
**Category:** programming\
**Created:** [October 15, 2004, 8:15am UTC](https://forum.kirupa.com/t/flash-asp-loadvariables-problem/67374 "2004-10-15T08:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lood](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@Lood](https://forum.kirupa.com/u/Lood)\
**Post date:** [October 15, 2004, 8:15am UTC](https://forum.kirupa.com/t/flash-asp-loadvariables-problem/67374/1 "2004-10-15T08:15:46Z")

</div>

Yo,  
I’m trying to load variables in to my flash movie using asp. The asp file fetches the data from an access database.  
But there seems to be a problem loading the data in to flash. if I trace the variables, they all are “undefined”. The weird thing is that when I execute the asp file without flash, all variables are displayed.

Hope someone could help me out. the code is very simple :

**ActionScript :**

```auto
myVars = new LoadVars();
myVars.onLoad = function(success) {
if (success) {
handleData();
} else {
trace("load file failure");
}
}
myVars.load("forum.asp")
function handleData() {
trace(myVars.naam5);
b = myVars*
for (a=0;a < b;a++)
{
trace(myVars.naam1);
}
}

```

**ASP :**

```auto
 
<% @ language=vbscript %>
<%
dim strConn
dim cnnConn
dim rstKoi
dim i
strConn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & _
Server.Mappath("tviske.mdb")
set cnnConn = Server.CreateObject("ADODB.Connection")
cnnConn.Open strConn
set rstKoi = cnnConn.Execute("SELECT * FROM tblKoi")
i = 0
do while not rstKoi.EOF
response.write "naam" & i & "=" & rstKoi("naam") & "&price" & i & "=" & rstKoi("price") & "&size" & i & "=" & rstKoi("size") & "&age" & i & "=" & rstKoi("age") & "&pic" & i & "=" & rstKoi("picture") & "&breeder" & i & "=" & rstKoi("breeder") & "&"
i = i + 1
rstKoi.MoveNext
loop
response.write "i=" & i
cnnConn.Close
%>

```
