I have a table where I have used the code to have a new row added
using Java when selecting a button. I want to have multiple rows of
this data posted to a SQL database. I'm using classic ASP.
This is the java:
function addRowToTable()
{
var tbl = document.getElementById('Detail');
var lastRow = tbl.rows.length;
// if there's no header row in the table, then iteration = lastRow + 1
var iteration = lastRow;
var row = tbl.insertRow(lastRow);
var cell1 = row.insertCell(0);
var el = document.createElement('input');
el.setAttribute('type', 'text');
el.setAttribute('name', 'txtRow' + iteration);
el.setAttribute('size', '10');
cell1.appendChild(el);
I'm adding a row that has 4 cells. The first row is defined with
values that are pushed to a SQL Database, and the update works fine.
However, any of the "new" rows created by using the function do NOT
update to the DB.
I need help on how to label the new rows (fields) correctly- and to
get those recognized by my SQL statement which is:
sConnString = "Provider=SQLOLEDB; Data Source=; Initial Catalog=;
User ID=; Password=; Network Library=dbmssocn;"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open(sConnString)
sSQL = "INSERT INTO AftHrs (ddate, ihours, vname, vemail, ibackup,
iincident) VALUES ('" & ddate & "','" & ihours & "','" & vname
& "','" & vemail & "','" & ibackup & "','" & iincident & "')"
sSQL1 = "INSERT INTO AftHrsDet (vcaller, vcomments, ddatedet,
iincidentdet, ihourswork) VALUES ('" & ReplaceQuotes(vcaller) & "','"
& ReplaceQuotes(vcomments) & "','" & ddatedet & "','" & iincidentdet
& "','" & ihourswork & "')"
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/