Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the problem with this?

Status
Not open for further replies.

lucano

Programmer
Jul 19, 2002
4
MX
I'm trying to save a datetime field from an Informix DS 7.1.3 db in an array. But I keep getting the following message:

(0x80020009)
An exeption ocurred
/bookings/prueba.asp, line 17

Here is the code:
Dim Prueba()
x = 0
rsBooking.MoveFirst
Do
Redim Preserve Prueba(x)
Prueba(x) = cstr(rsBooking.Fields(0))
x = x + 1
rsBooking.MoveNext
Loop Until rsBooking.EOF
For x = 0 To Ubound(Prueba)
Response.Write Prueba(x) & &quot;<br>&quot;
Next

Any help here would be hot.

Thanks
 
lucano,

Try this...


Do While NOT rsBooking.EOF

Redim Preserve Prueba(x)
Prueba(x) = cstr(rsBooking.Fields(0))
x = x + 1
rsBooking.MoveNext
Loop


fengshui_1998
 
Fengshui_1998:

Got the same error message.

The funny thing is that if I don't use an array and a Do...Loop statement, it works. But I only get the first record in my set.

Response.Write cstr(rsBooking.Fields(0))

Thanks

Lucano
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top