hi,
currently use the following code to create an array
which is fine, but have probs when field has no value.
have the following fields in a table
photo1
photo2
photo3
the following code gets these fields
and puts them into an array.
this array is then used by a flash slideshow to display the images.
the problem starts when one of the pictures is missing
and the array has still been filled by three records, one of which is blank.
i need to build the array dynamically and only include
fields in the array that have value.
merry xmas to all
currently use the following code to create an array
which is fine, but have probs when field has no value.
have the following fields in a table
photo1
photo2
photo3
the following code gets these fields
and puts them into an array.
this array is then used by a flash slideshow to display the images.
the problem starts when one of the pictures is missing
and the array has still been filled by three records, one of which is blank.
i need to build the array dynamically and only include
fields in the array that have value.
merry xmas to all
Code:
photosql = "SELECT stockid, photo1, photo2, photo3 "_
& "FROM stock "_
& "WHERE stockid = 1"
Set rsphoto = Server.CreateObject("ADODB.Recordset")
rsphoto.Open photosql, conn
x_photo1 = rsphoto("photo1")
x_photo2 = rsphoto("photo2")
x_photo3 = rsphoto("photo3")
rsphoto.close
Set rsphoto = Nothing
Dim aImages
ReDim aImages(2)
aImages(0) = x_photo1
aImages(1) = x_photo2
aImages(2) = x_photo3