473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

My loop doesn't pick the last value

syedshaffee
hey people,

please help me on this i can't get the point why the last 2 text field value is not picked its blank
Expand|Select|Wrap|Line Numbers
  1. Checkbox1= Request.Form("same")
  2. Comments=Request.Form("Comments")
  3. strDate=Request.Form("Date")
  4. a=Split(Comments ,",")
  5. c=Split(strDate,",")
  6. b=Split(Checkbox1,",") 
  7. TextBoxValue=UBound(c)
  8. checkboxValue=UBound(b)
  9. 'Response.Write TextBoxValue
  10. redim AssetId(checkboxValue)
  11. redim DateofReturned(checkboxValue)
  12. redim comments(checkboxValue)
  13. for i=0 to checkboxValue
  14. Response.Write a(i)
  15. Response.Write c(i)
  16. count=count+1
  17. next 
  18.  
But when i do it with for each it work fine
Expand|Select|Wrap|Line Numbers
  1. for each iA in c
  2. DateofReturned=iA
  3. Response.Write DateofReturned
  4. next
  5.  
how can i retrieve the index array of it Please help
Apr 2 '12 #1
3 1794
Rabbit
12,516 Expert Mod 8TB
That's because you're using the upper bound of the wrong array. You're using the upper bound of array b when you're trying to access array a and c.
Apr 2 '12 #2
hey thanx now how would i pick those three values and insert it into a table can u give me the logic of it please
Apr 3 '12 #3
Rabbit
12,516 Expert Mod 8TB
If everything else is working, and I can only assume otherwise because you haven't stated that anything else is wrong, all you need to do is use the upper bound of the correct array.
Apr 3 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: user | last post by:
when i first load index.php with arguments ie: "index.php?page=x", the $_SERVERvalue is null. I then get the session id appended to each link. If i refresh the page, I get the $_SERVER I want, but...
0
by: b0yce | last post by:
Hi all, I am trying to create a recursive loop transformation that remembers last position of inner loop so that it continues from that point instead of the point from where the recursion...
3
by: Liz Malcolm | last post by:
Hello and TIA for guidance. I am building a reusable search procedure (thanks go to Graham Thorpe for his example that set me on my way). Everything works up until the 2nd match is found, the...
19
by: Stephan Aspridis | last post by:
Hi folks, a happy new year. I have a little problem with a program I am writing at the moment. A loop doesn't behave the way I'd like to (namely, the "break" is ignored). This is the code in...
7
by: Robert | last post by:
I have the function below. it returns a "simpleresult" which I've also included the definition of below. In VS2005 (after upgrading the project), I get a warning indicating that Function...
6
by: Screaming Eagles 101 | last post by:
Hi, I got this warning, but I don't have a clue on how to resolve it the best way, maybe one of you can help. Application is running smoothly, it's only a warning, but I'd like to resolve it. ...
4
by: a | last post by:
I have been cleaning up somebody else's code in Vs2005 .net 2.0 There wer lots of these code pat errors because of unitialized variables in functions with Conditionals - that may or may not be...
32
by: jamieexley | last post by:
what are the parameters needed in the constructor call below to create a Date variable whose intitial value is the 15th of March 2004????
2
by: Bart Van Hemelen | last post by:
The situation: I have a CheckBoxList cblTest, the items are disabled in cblTest_DataBound in a foreach (ListItem oItem in cblTest.Items) loop. I provide a link that calls a client-side JavaScript...
8
by: dkate777 | last post by:
I have a PHP/mySQL database running, and I've realized I'm come across an awkward little bug. I have a form where a user fills out their information using populated drop down boxes. This...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.