pokemon
06-25-2003, 01:25 PM
Here what i'm trying to do. i have 2 tables in SQL:
table 1 containing 10 records or more.
table 2 is totally empty:
on page one i have a code to display the values from table 1
code:--------------------------------------------------------------------------------
& "<TD><INPUT TYPE=TEXT NAME=""" & iCount & ".cost"" VALUE=""" & rsData2("BegCkNo1") & """ size=""10""></TD>" & vbCrLf _
--------------------------------------------------------------------------------
my hidden code:
code:--------------------------------------------------------------------------------
Dim ITotal
ITotal = iCount - 1
<INPUT TYPE=HIDDEN NAME=""Count"" VALUE=""" & ITotal & """>
--------------------------------------------------------------------------------
with the code above i can pull out 10 records display within 10 textboxes (note: there are only one field name for textbox), then i will do an insertion .
an insert code:
code:--------------------------------------------------------------------------------
Dim i, strCheckNumIn
iCount = Request("Count")
For iLoop = 0 to iCount
strCheckNumIn = Request.Form("CheckNum")(iLoop)
strSQL = "insert into CFM (CheckNum1) Values ('" & strCheckNumIn & ")"
Conn.Execute(strSQL)
next
--------------------------------------------------------------------------------
Now, i'm inserting 10 records that i'm displaying to table 2. For some reason i can't get it to work. Nothing inserted into database. Please advise me, thanks
table 1 containing 10 records or more.
table 2 is totally empty:
on page one i have a code to display the values from table 1
code:--------------------------------------------------------------------------------
& "<TD><INPUT TYPE=TEXT NAME=""" & iCount & ".cost"" VALUE=""" & rsData2("BegCkNo1") & """ size=""10""></TD>" & vbCrLf _
--------------------------------------------------------------------------------
my hidden code:
code:--------------------------------------------------------------------------------
Dim ITotal
ITotal = iCount - 1
<INPUT TYPE=HIDDEN NAME=""Count"" VALUE=""" & ITotal & """>
--------------------------------------------------------------------------------
with the code above i can pull out 10 records display within 10 textboxes (note: there are only one field name for textbox), then i will do an insertion .
an insert code:
code:--------------------------------------------------------------------------------
Dim i, strCheckNumIn
iCount = Request("Count")
For iLoop = 0 to iCount
strCheckNumIn = Request.Form("CheckNum")(iLoop)
strSQL = "insert into CFM (CheckNum1) Values ('" & strCheckNumIn & ")"
Conn.Execute(strSQL)
next
--------------------------------------------------------------------------------
Now, i'm inserting 10 records that i'm displaying to table 2. For some reason i can't get it to work. Nothing inserted into database. Please advise me, thanks