M
MasterChief
I have a database of Company titles that I want to grab from an access
database, put into an asp array and then pass it to javascript so I can
output it into a CSS styled javascript menu. Right now I am stuck on
how to exactly put the database entries into an asp array. Below is
what I have so far. So I want it to return distinct entries from the
Title field and put it into the array called Titles after the asp code
has done an HTMLEncode to make sure I can also pass it along to another
asp page. Basically I need to know what to put after the Do While NOT
Rs.EOF. Any help would be appreciated.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "PhoneList"
sSQL = "SELECT DISTINCT Title FROM Everyone WHERE Location='Admin' AND
Not Title IS NULL ORDER BY Title ASC"
Set Rs = Conn.Execute(sSQL)
Do While NOT Rs.EOF
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
%>
database, put into an asp array and then pass it to javascript so I can
output it into a CSS styled javascript menu. Right now I am stuck on
how to exactly put the database entries into an asp array. Below is
what I have so far. So I want it to return distinct entries from the
Title field and put it into the array called Titles after the asp code
has done an HTMLEncode to make sure I can also pass it along to another
asp page. Basically I need to know what to put after the Do While NOT
Rs.EOF. Any help would be appreciated.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "PhoneList"
sSQL = "SELECT DISTINCT Title FROM Everyone WHERE Location='Admin' AND
Not Title IS NULL ORDER BY Title ASC"
Set Rs = Conn.Execute(sSQL)
Do While NOT Rs.EOF
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
%>