Forum Moderators: open
Here is a sample of my code.
var dbconn = Server.CreateObject("ADODB.Connection")
dbconn.Open(Application('DB_ConnectionString'))
var Hotels=new Array();
rs=getTypeHotels(3); // getTypeHotels: function that executes a query
while(!rs.EOF)
{
n=rs("HotelID");
Hotels.push(n);
Response.Write(Hotels)
rs.MoveNext();
}
If my recordset contains following values:0,1,2.
In the first loop I have:0
In the second loop I have (1,1) instead of (0,1)
In the third loop: (2,2,2), instead of (0,1,2)
What am I doing wrong? Please help me out!