arrays in ASP

V

vdevarakonda

Hello All,

I am new to ASP...I might be asking very simple question...but this is really causing problem to me.
I have an array in ASP and I am populating the array with the values from database on checking a condition.
Lets say i have array of arr(5).
Initially I made all the array items null
For k = 0 to 4
arr(k) = null
Next

Then, I will check the condition and acoordingly I will populate the array. As a result, I expect my array to have values like
arr(0) = null
arr(1) = null
arr(2) = 452
arr(3) = null
arr(4) = null
but to my surprise, my array has values
arr(0) = null
arr(1) = 452
arr(2) = 452
arr(3) = 452
arr(4) = 452



What could be the reason? anyhelp would be greatly appreciated.

Thank you ,
vasanthi

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
A

Alex Goodey

can't help without seeing the actual code.


vdevarakonda said:
Hello All,

I am new to ASP...I might be asking very simple question...but this is really causing problem to me.
I have an array in ASP and I am populating the array with the values from
database on checking a condition.
Lets say i have array of arr(5).
Initially I made all the array items null
For k = 0 to 4
arr(k) = null
Next

Then, I will check the condition and acoordingly I will populate the
array. As a result, I expect my array to have values like
arr(0) = null
arr(1) = null
arr(2) = 452
arr(3) = null
arr(4) = null
but to my surprise, my array has values
arr(0) = null
arr(1) = 452
arr(2) = 452
arr(3) = 452
arr(4) = 452



What could be the reason? anyhelp would be greatly appreciated.

Thank you ,
vasanthi

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top