I am trying to create an array then populate a dropdown list with it. I am not sure what I am doing wrong here. I am just learning about arrays, so any help with this would be greatly appreciated.
X = 0
Set myCN = CreateObject ("ADODB.Connection")
Set myRS = CreateObject ("ADODB.Recordset")
myCN.ConnectionString="Provider=MSDataShape; Driver=SQL Server;Server=sqlserver; UID=sa; PWD=newpass; DATABASE=myDB"
myRS.ActiveConnection = myCN
myRS.Open "SELECT Name FROM tblEmp ORDER BY Name"
Dim MyArray(0 to 300)as string
if not myRS.EOF then
do while not myRS.EOF
MyArray (X) = myRS ("Name")
X = X + 1
Response.write "<option value="MyArray (X)"</option>"