473,325 Members | 2,308 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,325 software developers and data experts.

problem in my Loop

syedshaffee
hey people,

I have a problem in my loop it is not picking values from the last row please help

Expand|Select|Wrap|Line Numbers
  1. dim i
  2. dim checkboxValue
  3. dim TextBoxValue
  4.  
  5. dim Count
  6. dim Count1
  7. dim postion
  8. dim postion1
  9. position=0
  10. postion1=0
  11. i=0
  12. Checkbox1= Request.Form("same")
  13. Comments=Request.Form("Comments")
  14. strDate=Request.Form("Date")
  15. a=Split(Comments ,",")
  16. c=Split(strDate,",")
  17. b=Split(Checkbox1,",") 
  18.  
  19.  
  20. TextBoxValue=UBound(a)
  21. checkboxValue=UBound(b)
  22.  
  23. if TextBoxValue  > checkboxValue then
  24. for i=0 to  checkboxValue step 1
  25. objRIMSConn.Execute "Insert into Eot_returned (Contract_no,Asset_id,Date_to_be_excepted,Comments)values ('" + Session("Contract_no") + "'," + b(i) + ",'" + FormatDateTime(c(i),1)+ "','"+ a(i) +"');"
  26.  
  27. next
Example:
Expand|Select|Wrap|Line Numbers
  1. +-----+-------+-------+
  2. |     |       |       | < - 1st row
  3. +-----+-------+-------+
  4. |     |       |       | < - 2nd row 
  5. +-----+-------+-------+
  6. |     |       |       | < - 3rd row 
  7. +-----+-------+-------+
  8.  

the values are not been fetched from the last row
i think the problem is in the code
Expand|Select|Wrap|Line Numbers
  1. TextBoxValue=UBound(a)
  2. checkboxValue=UBound(b)
  3.  
how would i loop according to the values retrieved from the form
Feb 13 '12 #1
0 1296

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

Similar topics

43
by: Gremlin | last post by:
If you are not familiar with the halting problem, I will not go into it in detail but it states that it is impossible to write a program that can tell if a loop is infinite or not. This is a...
2
by: Xiaozhu | last post by:
I trid to use icc -axW to optimize the code, but it becomes much slower... 8sec/37sec before and after using this option. my cpu is Intel(R) Pentium(R) 4 CPU 2.40GHz the test code is just one...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
8
by: Jeff | last post by:
Hello everybody, I was doing one of the exercises in the K&R book, and I got something really strange. Here's the source code: /* * Exercise 2-2 from the K&R book, page 42 */ #include...
47
by: fb | last post by:
Hi Everyone. Thanks for the help with the qudratic equation problem...I didn't think about actually doing the math...whoops. Anyway... I'm having some trouble getting the following program to...
15
by: Mike Lansdaal | last post by:
I came across a reference on a web site (http://www.personalmicrocosms.com/html/dotnettips.html#richtextbox_lines ) that said to speed up access to a rich text box's lines that you needed to use a...
8
by: koorb | last post by:
I am starting a program from a module with the Sub main procedure and I want it to display two forms for the program's interface, but when I run the program both forms just open and then program...
1
by: Promextheus Xex | last post by:
First php post... Hi there, I'm writing some code for my website to list people listening to my music. I have a loop for an array that dosen't seem to display all people. most of the time it...
2
by: sheaguevara | last post by:
This is my first post onto the forum. So first off, I'd like to say hello to everyone. I just started working on a login/registration system and I am trying to have a feature where the user will...
5
by: sgurukrupagmailcom | last post by:
Hi, I haven't come accross an elegant solution to a design problem that I show below. Have a look at the piece of code here: class Exc { Exc () { System.out.println ("Haribol"); }
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.