jansangill
Programmer
This is my ASp code.
<%@Language=VBScript%>
<%Option Explicit%>
<%
''the data coming from Flash
Dim dvdID
dvdID = Trim(Request("sentID"))
'''''''Make the connection
Dim myConnection
Set myConnection=Server.CreateObject("ADODB.Connection")
myConnection.ConnectionString="DRIVER= {Microsoft Access Driver (*.mdb)};" & "DBQ="& Server.MapPath("../database/jn.mdb")
myConnection.Open
'''''''Create the SQL statement we need and set it to a variable
Dim getDVDInfo
getDVDInfo = "SELECT * FROM hylde1 WHERE status=" & dvdID
'''''''Make the record set object
Dim myRS
Set myRS=Server.CreateObject("ADODB.Recordset")
myRS.Open getDVDInfo, myConnection
Dim allHylder, ids, info, mainMessage
Do While Not (myRS.EOF)
allHylder = allHylder& myRS("hylde1")
ids = ids & myRS("id")
info = info & myRS("info")
myRS.MoveNext
Loop
'''''''Create the message we are sending to Flash
mainMessage = "hylde1=" & allHylder & "&ids=" & ids & "&info=" & info
'''''''Clean up...MUST HAVE!!!
myRS.Close
Set myRS=Nothing
myConnection.Close
Set myConnection=Nothing
'''''''Send that data to Flash
Response.Write(mainMessage)
%>
This is my flash(does not work)
//The listener object for when a user selects a DVD
var dvd_obj:Object = new Object();
dvd_obj.change = function(){
var dvdID = raekke_list.value;
var dvdInfo_lv:LoadVars = new LoadVars();
dvdInfo_lv.onLoad = function(success){
if(success){
if(!this.error){
LOOP INFO OUT; HOW??????????
}else{
trace(this.error);
}
}else{
trace("An error occurred with the connection");
}
}
dvdInfo_lv.sentId = dvdID;
//send and receive the data
dvdInfo_lv.sendAndLoad(" "GET");
}
//add the event listener to the List component
raekke_list.addEventListener("change", dvd_obj);
Its all build up so when you press a number in a listBox (number 1-19) some info is supposed to loop out from the id pressed, i.e 1. So far ive used a lot of time on it without luck.
Hope one of you can help
<%@Language=VBScript%>
<%Option Explicit%>
<%
''the data coming from Flash
Dim dvdID
dvdID = Trim(Request("sentID"))
'''''''Make the connection
Dim myConnection
Set myConnection=Server.CreateObject("ADODB.Connection")
myConnection.ConnectionString="DRIVER= {Microsoft Access Driver (*.mdb)};" & "DBQ="& Server.MapPath("../database/jn.mdb")
myConnection.Open
'''''''Create the SQL statement we need and set it to a variable
Dim getDVDInfo
getDVDInfo = "SELECT * FROM hylde1 WHERE status=" & dvdID
'''''''Make the record set object
Dim myRS
Set myRS=Server.CreateObject("ADODB.Recordset")
myRS.Open getDVDInfo, myConnection
Dim allHylder, ids, info, mainMessage
Do While Not (myRS.EOF)
allHylder = allHylder& myRS("hylde1")
ids = ids & myRS("id")
info = info & myRS("info")
myRS.MoveNext
Loop
'''''''Create the message we are sending to Flash
mainMessage = "hylde1=" & allHylder & "&ids=" & ids & "&info=" & info
'''''''Clean up...MUST HAVE!!!
myRS.Close
Set myRS=Nothing
myConnection.Close
Set myConnection=Nothing
'''''''Send that data to Flash
Response.Write(mainMessage)
%>
This is my flash(does not work)
//The listener object for when a user selects a DVD
var dvd_obj:Object = new Object();
dvd_obj.change = function(){
var dvdID = raekke_list.value;
var dvdInfo_lv:LoadVars = new LoadVars();
dvdInfo_lv.onLoad = function(success){
if(success){
if(!this.error){
LOOP INFO OUT; HOW??????????
}else{
trace(this.error);
}
}else{
trace("An error occurred with the connection");
}
}
dvdInfo_lv.sentId = dvdID;
//send and receive the data
dvdInfo_lv.sendAndLoad(" "GET");
}
//add the event listener to the List component
raekke_list.addEventListener("change", dvd_obj);
Its all build up so when you press a number in a listBox (number 1-19) some info is supposed to loop out from the id pressed, i.e 1. So far ive used a lot of time on it without luck.
Hope one of you can help