travisbrown
Technical User
- Dec 31, 2001
- 1,016
Okay, why isn't this working? It only creates a recordset with the last row added, each time seemingly overwriting the previous row. I'm sure I've done this before without issue. Is there a PRESERVE switch I'm missing?
Code:
<!--#include file="adovbs.inc" -->
<%
SET rs = createobject("adodb.recordset")
WITH rs.Fields
.Append "file_name", adChar, 255
.Append "file_size", adChar, 255
END WITH
rs.Open
rs.AddNew
rs("file_name") = "A"
rs("file_size") = "A"
rs.Update
rs.AddNew
rs("file_name") = "B"
rs("file_size") = "B"
rs.Update
rs.AddNew
rs("file_name") = "C"
rs("file_size") = "C"
rs.Update
IF NOT rs.BOF AND NOT rs.EOF THEN
arr = rs.GetRows()
FOR i = 0 TO UBOUND(arr,2)
response.write arr(0,i)
response.write arr(1,i)
NEXT
END IF
rs.close
SET rs = Nothing
%>