I can't get this array to work. It is my first one and I have read all the FAQ's but there is nothing about multi-dementional array's. My GOAL is to pull out info from the DB in a format like so:<BR><BR>Category1<BR> * question related to category1<BR> * question related to category1<BR>Category2<BR> * question related to category2<BR> * question related to category2<BR><BR>etc... Every question in DB is related to one of the categories.<BR><BR>Here is what I have so far:<BR><BR> <%<BR> Dim catArray()<BR> Dim rs<BR> Dim x<BR> x=0<BR> <BR> <BR> sql="SELECT distinct categories FROM TBL1 where Product ='Whatever'" <BR> sql=sql & "ORDER BY categories"<BR> Set rs = Server.CreateObject("ADODB.Recordset") <BR> rs.Open sql, oConn, adopenstatic <BR> <BR> do while not rs.EOF<BR> x=x+1<BR> 'redim PRESERVE catArray(x) <BR> redim PRESERVE catArray(18, x-1) <BR> 'catArray(x)= rs("Categories")<BR> catArray(0, x-1)=rs("Categories")<BR> catArray(1, x-1)=rs("Categories")<BR> catArray(2, x-1)=rs("Categories")<BR> catArray(3, x-1)=rs("Categories")<BR> catArray(4, x-1)=rs("Categories")<BR> catArray(5, x-1)=rs("Categories")<BR> catArray(6, x-1)=rs("Categories")<BR> catArray(7, x-1)=rs("Categories")<BR> catArray(8, x-1)=rs("Categories")<BR> catArray(9, x-1)=rs("Categories")<BR> catArray(10, x-1)=rs("Categories")<BR> catArray(11, x-1)=rs("Categories")<BR> catArray(12, x-1)=rs("Categories")<BR> catArray(13, x-1)=rs("Categories")<BR> catArray(14, x-1)=rs("Categories")<BR> catArray(15, x-1)=rs("Categories")<BR> catArray(16, x-1)=rs("Categories")<BR> catArray(17, x-1)=rs("Categories")<BR> rs.MoveNext <BR> loop<BR> rs.close<BR><BR> <BR> <BR>Dim QuestArray<BR> <BR> <BR>sql="Select * from TBL1 where product ='whatever'"<BR>'sql=sql & "AND categories = categories" <BR>sql=sql & "ORDER BY categories"<BR>Set rs = Server.CreateObject("ADODB.Recordset") <BR>rs.Open sql, oConn, adopenstatic <BR> do while not rs.EOF<BR> redim PRESERVE QuestArray(x) <BR> QuestArray(x)= rs("Questions")<BR> <BR> response.write "<ul>"<BR> response.write rs("categories") & "<p>"<BR> response.write "<li>"<BR> response.write rs("Questions") & "<p>" <BR> response.write "</li>" response.write "</ul>" <BR> <BR> rs.MoveNext <BR> loop<BR> %><BR>Error is Microsoft VBScript runtime (0x800A000D)<BR>Type mismatch<BR>on this line: redim PRESERVE QuestArray(x)<BR><BR>I have referenced books and the examples are not dealing with DB and are fairly simple. Any help would be appreciated. Thanks!<BR>