# DB -\> ASP -\> LoadVars -\> Array \[fmx\]

**URL:** <https://forum.kirupa.com/t/db-asp-loadvars-array-fmx/43274>\
**Category:** flash\
**Created:** [February 20, 2004, 3:35pm UTC](https://forum.kirupa.com/t/db-asp-loadvars-array-fmx/43274 "2004-02-20T15:35:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roady](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@roady](https://forum.kirupa.com/u/roady)\
**Post date:** [February 20, 2004, 3:35pm UTC](https://forum.kirupa.com/t/db-asp-loadvars-array-fmx/43274/1 "2004-02-20T15:35:56Z")

</div>

Hi, looked everywhere after a solution to this problem but it’s nowhere to be found.

Lets pretend that I want to write out some names from a DB and then get it with loadvars and then put it in an array for easy using later, how do I do this the best way ??

First thing first I have made an ASP file like this:

```auto
<%
	Dim objConnect, objRS, SQL, strConn, i
		Set objConnect	= Server.CreateObject("ADODB.Connection")
		Set objRS = Server.CreateObject("ADODB.Recordset")
		
			strConn	= "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("db1.mdb")
			SQL = "SELECT userFname, userEname FROM tblUser ORDER BY userFname Asc;"
			i = 0
			
		objConnect.Open(strConn)
		objRS.Open(SQL), objConnect
		
		If Not objRS.EOF Then
			Do Until objRS.EOF
				Response.Write("&userFname"& i &"="& objRS(0) &"&userEname"& i &"=" & objRS(1))
				i = i +1
			objRS.MoveNext
			Loop
		End If
		
		objRS.Close: Set objRS = Nothing
		objConnect.Close: Set objConnect = Nothing

%>

```

it generates this  
[COLOR=red]&userFname0=Fröken&userEname0=Fräken&userFname1=Kalle&userEname1=Banan&userFname2=Nisse&userEname2=Ljung&userFname3=Stina&userEname3=Ljung[/COLOR]

Now I schould take this string into flash.  
the basic step is this.

[AS]\_root.path = “[http://localhost/flashDbTest/](http://localhost/flashDbTest/)”;  
var arrNames = new Array();  
var myLoadVars = new LoadVars();  
myLoadVars.load(\_root.path + “getInfo.asp”);  
myLoadVars.onLoad = fncLoadedInfo;

function fncLoadedInfo() {  
[COLOR=red]WHAT SCOULD I DO HERE ??[/COLOR]   
}[/AS]

[SIZE=3] **So after a lot of text en explenations the main question is, how do I loop out this thing and put it all in an array =?** [/SIZE]
