Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: data updating


Message #1 by "Lee Hoay Fern" <hoayfern.lee@d...> on Tue, 2 Oct 2001 08:31:38
hi,

 

May I know how can i update multiple data at one time

 

example: i need user to key in 

EmpName:

Dept:

Month:

 

date FromTime      ToTime        Purpose

1

2

3

4

5

6

7

8

9

until 30

 

the date from 1 to 30, i use drop down to let user choose, for the 

FromTime and ToTime and Purpose i use text box

 

how can i modify my coding to update the multiple data at one time.

 

for every employee, i want records the date,fromtime,totime and purpose

 

if the employee have do OT for multiple date, then for ecah date must have 

the employee name,dept and month

 



actually i have design a form in table format , i try to use the Excel 

format :

 

here is the coding of my form:

 

<%@ Language=VBScript %>

<%

 set conn=server.CreateObject ("ADODB.connection")

 conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _

 "Data Source=C:\Inetpub\wwwroot\OT\OT.mdb;" & _

 "Persist Security Info=False"

 

%>

 

<%

 

For i = 1 To Request("EmpName").Count

IF Request("FromTime")(i) <> "" And Request("ToTime")(i) <> "" Then

'while Request("FromTime")(i) <> "" And Request("ToTime")(i) <> "" 

'IF Request("EmpName")(i) <> "" then

SQLStr = "insert into Admin (EmpName, Dept, Month, Day, FromTime, ToTime, 

Total, Purpose,) values ('" & Request("EmpName")(i) & "','" & Request

("Dept")(i) & "','" & Request("Month")(i) & "','" & Request("Day")(i) 

& "', & '" & Request("FromTime")(i) & "','" & Request("ToTime")(i) & "','" 

& Request("Total")(i) & "', '" & Request("Purpose")(i)& "')"

'SQLStr = "insert into Admin (Day, FromTime, ToTime, Total, Purpose,) 

values ('" & Request("Day")(i) & "', & '" & Request("FromTime")(i) & "','" 

& Request("ToTime")(i) & "','" & Request("Total")(i) & "', '" & Request

("Purpose")(i)& "')"

Response.Write SQLStr

Conn.Execute(SQLStr)

end if

%>

<%

next

%>

<HTML>

<HEAD>

<TITLE>OT APPLICATION</TITLE>

<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

</HEAD>

<BODY bgColor=moccasin>

<form name="form2" action="admincode.asp" method="post">

 

<P align=center><FONT size=6>Duraco Industries Pte Ltd 

Overtime Form</FONT>     </P>

<P><IMG style="WIDTH: 735px; HEIGHT: 9px" height=9 

alt=Picture src="file://C:\Inetpub\wwwroot\OT\ASSETS\IMAGES\Bar1.gif" 

width=520 

border=0></P>

<P>Name :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp; <SELECT id=select2 style="WIDTH: 118px" name=EmpName> 

<OPTION value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION>

<OPTION value="Kew Pui Fun">Kew Pui Fun</OPTION>

<OPTION value=""></OPTION></SELECT></P>

<P>Department :&nbsp;&nbsp;&nbsp; <SELECT id=select2 style="WIDTH: 116px" 

name=Dept> <OPTION value=IT selected>IT</OPTION>

<OPTION value="MAKERTING" >MAKERTING</OPTION>

<OPTION value="ACCOUNTS" >ACCOUNTS</OPTION>

<OPTION value=""></OPTION></SELECT></P>

<P>Month:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

&nbsp; <SELECT id=select1 style="WIDTH: 118px" name=Month> 

<OPTION value=JAN selected>JAN</OPTION>

<OPTION value="FEB" >FEB</OPTION></SELECT></P>

<TABLE cellSpacing=1 cellPadding=1 width="586" border=1 style="WIDTH: 

586px; HEIGHT: 508px">

  

  <TR>

    <TD>

      <P align=center>Date</P></TD>

    <TD>Name</TD>

    <TD>

      <P align=center>From Time</P> </TD>

    <TD>

      <P align=center>To Time&nbsp;&nbsp;&nbsp; </P>  </TD>

    <TD>

      <P align=center>Total</P></TD>

    <TD>

      <P align=center>Purpose</P>  </TD></TR>

  <TR>

 

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 45px" name=Day> 

        <OPTION value=1 selected>1</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime> </P> </TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime> </P> </TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 46px" name=Day> 

        <OPTION value=2 selected>2</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 46px" name=Day> 

        <OPTION value=3 selected>3</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 44px" name=Day> 

        <OPTION value=4 selected>4</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 42px" name=Day> 

        <OPTION value=5 selected>5</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 42px" name=Day> 

        <OPTION value=6 selected>6</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=7 selected>7</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 45px" name=Day> 

        <OPTION value=8 selected>8</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 44px" name=Day> 

        <OPTION value=9 selected>9</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=10 selected>10</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=11 selected>11</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=12 selected>12</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

      size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=13 selected>13</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=14 selected>14</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

      size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR>

  <TR>

    <TD>

      <P align=center><SELECT id=select3 style="WIDTH: 43px" name=Day> 

        <OPTION value=15 selected>15</OPTION></SELECT></P></TD>

    <TD><SELECT id=select2 style="WIDTH: 118px" name=EmpName> <OPTION 

        value="Lee Hoay Fern" selected>Lee Hoay Fern</OPTION> <OPTION 

        value="Kew Pui Fun">Kew Pui Fun</OPTION> <OPTION 

      value=""></OPTION></SELECT></TD>

    <TD>

      <P align=center><INPUT style="WIDTH: 90px; HEIGHT: 22px" size=12 

name=FromTime></P></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 95px; HEIGHT: 22px" 

      size=13 name=ToTime></P></TD>

    <TD><INPUT id=text2 style="WIDTH: 50px; HEIGHT: 22px" size=7 

name=Total></TD>

    <TD>

      <P align=center><INPUT id=text1 style="WIDTH: 304px; HEIGHT: 22px; 

BACKGROUND-COLOR: white" size=43 name=Purpose></P></TD></TR></TABLE>

<P>&nbsp;</P>

<P><P align=left><INPUT TYPE="submit" NAME="OK" VALUE="OK" ></TD>

<P>&nbsp;</P></form>

 

</BODY>

</HTML>

 



my question:

 

1)how can i try to input the data for EmpName, Dept,Month but i cant

 

i use this coding but it doesnt works. <%

 

For i = 1 To Request("EmpName").Count

IF Request("FromTime")(i) <> "" And Request("ToTime")(i) <> "" Then

 

SQLStr = "insert into Admin (EmpName, Dept, Month, Day, FromTime, ToTime, 

Total, Purpose,) values ('" & Request("EmpName")(i) & "','" & Request

("Dept")(i) & "','" & Request("Month")(i) & "','" & Request("Day")(i) 

& "', & '" & Request("FromTime")(i) & "','" & Request("ToTime")(i) & "','" 

& Request("Total")(i) & "', '" & Request("Purpose")(i)& "')"

Conn.Execute(SQLStr)

end if

%>

<%

next

%>

 



 
Message #2 by yacobo@n... on Wed, 3 Oct 2001 03:28:34
Hi 

I recommand you to redesign your Form and ASP Page. 

This is reason that i got below output by testing your asp code.



I've used Response.Form.Item

So, Your Posted data is arranged incorrectly.

EmpName(0) isn't match Others fields(0).

And request("EmpName").count is out of boundary. 

So, request("EmpName").count -1 is correct.



Redesign your form field. 



===Output =========

EmpName=Lee+Hoay+Fern&Dept=IT&Month=JAN&Day=1&EmpName=Kew+Pui+Fun&FromTime

2001-02-13&ToTime=2001-02-

14&Total=21&Purpose=Reception&Day=2&EmpName=Kew+Pui+Fun&FromTime=2001-03-

13&ToTime=2001-03-

14&Total=23&Purpose=Travel&Day=3&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&To

tal=&Purpose=&Day=4&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose

&Day=5&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=6&EmpNam

e=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=7&EmpName=Lee+Hoay+Fe

rn&FromTime=&ToTime=&Total=&Purpose=&Day=8&EmpName=Lee+Hoay+Fern&FromTime=&

ToTime=&Total=&Purpose=&Day=9&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total

=&Purpose=&Day=10&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&D

ay=11&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=12&EmpNam

e=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=13&EmpName=Lee+Hoay+F

ern&FromTime=&ToTime=&Total=&Purpose=&Day=14&EmpName=Lee+Hoay+Fern&FromTime

=&ToTime=&Total=&Purpose=&Day=15&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&To

tal=&Purpose=&OK=OK

Your EmpName Count is 16

Your EmpName collection is Lee Hoay Fern, Kew Pui Fun, Kew Pui Fun, Lee 

Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee 

Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee 

Hoay Fern, Lee Hoay Fern, Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

insert into Admin (EmpName, Dept, Month, Day, FromTime, ToTime, Total, 

Purpose,) values ('Lee Hoay Fern','IT','JAN','1','2001-02-13','2001-02-

14','21', 'Reception')

Your EmpName collection is Kew Pui Fun

insert into Admin (EmpName, Dept, Month, Day, FromTime, ToTime, Total, 

Purpose,) values ('','2001-03-13','2001-03-14','23', 'Travel')

Your EmpName collection is Kew Pui Fun

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern

Your EmpName collection is Lee Hoay Fern



==================================================================

Message #3 by "HoayFern" <hoayfern.lee@d...> on Wed, 3 Oct 2001 15:40:52 -0700
hi



can i know what mistake i have made ?



u mean i have to redesign my form ?



hoay fern

----- Original Message -----

From: <yacobo@n...>

To: "Access ASP" <access_asp@p...>

Sent: Wednesday, October 03, 2001 3:28 AM

Subject: [access_asp] Re: data updating





> Hi

> I recommand you to redesign your Form and ASP Page.

> This is reason that i got below output by testing your asp code.

>

> I've used Response.Form.Item

> So, Your Posted data is arranged incorrectly.

> EmpName(0) isn't match Others fields(0).

> And request("EmpName").count is out of boundary.

> So, request("EmpName").count -1 is correct.

>

> Redesign your form field.

>

> ===Output =========

>

EmpName=Lee+Hoay+Fern&Dept=IT&Month=JAN&Day=1&EmpName=Kew+Pui+Fun&FromTime

> 2001-02-13&ToTime=2001-02-

> 14&Total=21&Purpose=Reception&Day=2&EmpName=Kew+Pui+Fun&FromTime=2001-03-

> 13&ToTime=2001-03-

>

14&Total=23&Purpose=Travel&Day=3&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&To

>

tal=&Purpose=&Day=4&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose

>

&Day=5&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=6&EmpNam

>

e=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=7&EmpName=Lee+Hoay+Fe

>

rn&FromTime=&ToTime=&Total=&Purpose=&Day=8&EmpName=Lee+Hoay+Fern&FromTime=&

>

ToTime=&Total=&Purpose=&Day=9&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total

>

=&Purpose=&Day=10&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&D

>

ay=11&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=12&EmpNam

>

e=Lee+Hoay+Fern&FromTime=&ToTime=&Total=&Purpose=&Day=13&EmpName=Lee+Hoay+F

>

ern&FromTime=&ToTime=&Total=&Purpose=&Day=14&EmpName=Lee+Hoay+Fern&FromTime

>

=&ToTime=&Total=&Purpose=&Day=15&EmpName=Lee+Hoay+Fern&FromTime=&ToTime=&To

> tal=&Purpose=&OK=OK

> Your EmpName Count is 16

> Your EmpName collection is Lee Hoay Fern, Kew Pui Fun, Kew Pui Fun, Lee

> Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee

> Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee Hoay Fern, Lee

> Hoay Fern, Lee Hoay Fern, Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> insert into Admin (EmpName, Dept, Month, Day, FromTime, ToTime, Total,

> Purpose,) values ('Lee Hoay Fern','IT','JAN','1','2001-02-13','2001-02-

> 14','21', 'Reception')

> Your EmpName collection is Kew Pui Fun

> insert into Admin (EmpName, Dept, Month, Day, FromTime, ToTime, Total,

> Purpose,) values ('','2001-03-13','2001-03-14','23', 'Travel')

> Your EmpName collection is Kew Pui Fun

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

> Your EmpName collection is Lee Hoay Fern

>

> ==================================================================

>


  Return to Index