adding values toDynamic array

06-18-2002, 06:22 AM
I'm using dynamic array to store IDs through session object. Now i have to store IDs in dynamic arrays without losing previous data of array , for that preserve keyword am using but it gives me err. oldIDs undefined.
the code is:

sub ID(oldIDs)
dim oldIDs()
redim preserve oldIDs(ubound(oldIDs)+ ubound(oldIDs))
end sub

here i'm calling this precedure with session object
ID session("ids")

will you help by giving a sample code.
it will be appreciated if help by giving example

06-18-2002, 08:04 AM
You use the same variable name as the parameter name and in the dim statement.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum