I have a text feild area ,Notes and I am inserting its value to the database table and the redirecting back to form.
I am displaying that notes value from database just above the textarea feild of the form.
I want that when my user submit more notes, that value should be able to add to the present value.
what I am able to do is update new value but not able to add to it.
I want to display it like:
notes.add notes.addmore notes....
This is the code I am using for form:
Code:<% if objRS2.recordcount > 0 then Response.Write objRS2("Notes") else Response.Write ("No Notes Specified") end if %> </td> </tr> <tr> <td height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="85%" align="left" valign="middle"> <textarea name="t1" cols="90" rows="4" wrap="OFF" class="style14" id="t1"></textarea>
This is the page where notes values are inserting to database
Code:Dim req_no, notes, Username req_no = Request.QueryString("req_no") Username = Request.QueryString("Username") notes = Request.form("t1") DIM objConn, sqlstr, objRS Set objConn = Server.CreateObject("ADODB.Connection") sConnString = "" mySQL = "SELECT * FROM Notes where req_no= "& req_no & ";" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open mysql, objConn,3,1 if objRS.recordcount > 0 then sSQL = "Update Notes set Notes='"¬es&"' where req_no='"&req_no&"'" else sSQL = "INSERT into Notes (req_no, Notes)values('" & req_no & "', '" & notes & "')" end if objConn.execute(sSQL) objRS.Close Set objRS = Nothing objConn.Close Set objConn = Nothing Response.Redirect("RMAdetails.asp?req_no="&req_no&"&Username="&Username)


Reply With Quote
Bookmarks