hello everyone,

Actually I have got a problem and would be really grateful if you could help me.I have got a textbox for course title and when clicking on a addmore button another textbox appears for coursetitle.These need to get saved to the sql server.This must be done only using asp and vbscript.I have done it as follows but it is not working(its only part of the codes)


if request("AddMore")<>"" then
CTitle=trim(request("qCTitle"))
CID=trim(request("qCID"))



set rx=Server.CreateObject("adodb.recordset")
rx.Open "COURSE" ,con, 1, 2, &H0002

With rsa
.AddNew
.fields("CID").value = CID
.fields("CTitle").value = CTitle


.Update
.Requery
.MoveLast
.Close

End With




response.redirect "zsave.asp?





end if

delete=trim(request("delete"))

if delete<>"" then


set rsd =Server.CreateObject("adodb.recordset")
set rsd = con.Execute("delete from COURSE where CID='" & CID&"'")


end if

<html>

'<%
'if CourseID <>"" then
'set dy =Server.CreateObject("adodb.recordset")
'set dy =con.Execute("SELECT CTitle.* FROM COURSE WHERE CID = '"&CID&"')
'do while not dy.eof


'%>


<tr>






<td class="gif">Course Title</td>

<input type="text" name="CTitle" <%=Fls%> size="60" value="<%=CTitle%>" ></td>

<td><a href="Courser.asp?delete=<%=CID%>">Delete</a> </td>


<tr></tr>

<%
dy.movenext()
loop
end if
%>



<tr>

<input type="text" name="qCTitle" <%=gif%> size="60" ></td>
<td><a href="Course.asp?delete=<%=CID%>">Delete</a> </td>

<!-- <td width="19%" class="titleX">
C ID</td>-->
<td width="19%" class="gif">


<input type="text" READONLY name="qCeID" size="10" value="<%=CID%>" ></td>


</tr>


and how to increment the value for the different CID.


thanks a lot in advance .

thanks and regards,

shenazj