i need help.....
i face problem when i want to update my mark obtained and comment data from this interface..if i key in data in mark obtained text field in first line of retrived data from database but by default system insert the same value for the other line..means in te database it contain the same value eventhough i never key in for the rest of textfield..
and if i key in data in whole textfield for the mark obtained and i get the msg "Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E57)
String or binary data would be truncated."
here i paste down my coding..
1) the coding from the post interface
<table width="100%" border="0">
<tr>
<td width="17%">Matric Number</td>
<td width="11%">Student Name</td>
<td width="14%">Assignment File</td>
<td width="10%"><span id="spUpload" name="spupload" style="display:none">Posted
On</span></td>
<td width="13%">Mark Obtained</td>
<td width="35%">Comment</td>
<% While not rsTugasan.eof %>
</tr>
<tr>
<td width="17%"><%= rsTugasan ("MatricNumber"
%>
<input type="text" name="NoMatrik" value="<%=rsTugasan("MatricNumber"
%>">
</td>
<td width="11%"><%=rsTugasan("NamaPel"
%></td>
<td width="14%"><%= rsTugasan("NamaFail"
%></td>
<td width="10%"><%= rsTugasan("TarikhHantar"
%></td>
<td width="13%">
<input type="text" name="Markah2" size="5" >
</td>
<td width="35%">
<textarea name="textarea" cols="-3" style="width:220px;height:50px" >
</textarea>
<% rsTugasan.movenext
wend
rsTugasan.movefirst
%>
</td>
</tr>
<tr>
<td width="17%"><%=b%></td>
<td width="11%"> </td>
<td width="14%">
<input type="hidden" name="Markah" value="<%=b%>" >
</td>
<td width="10%"> </td>
<td width="13%"> </td>
<td width="35%">
<input type="submit" name="Submit2" value="Update">
</td>
</tr>
</table>
2) coding of request form
<%
session("AsgnCode"
=request.form("Markah"
b=session("AsgnCode"
response.write b
NoMatrik=request.form("NoMatrik"
response.write NoMatrik
markah = request.form("Markah2"
SQL= "UPDATE Tugasan SET "
SQL = SQL + "Markah='" & markah & "'"
SQL = SQL + "where AsgnCode='"& b &"' "
set RS=objConn.Execute(SQL)
objConn.close
set objConn=Nothing
%>
thanks...
i face problem when i want to update my mark obtained and comment data from this interface..if i key in data in mark obtained text field in first line of retrived data from database but by default system insert the same value for the other line..means in te database it contain the same value eventhough i never key in for the rest of textfield..
and if i key in data in whole textfield for the mark obtained and i get the msg "Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E57)
String or binary data would be truncated."
here i paste down my coding..
1) the coding from the post interface
<table width="100%" border="0">
<tr>
<td width="17%">Matric Number</td>
<td width="11%">Student Name</td>
<td width="14%">Assignment File</td>
<td width="10%"><span id="spUpload" name="spupload" style="display:none">Posted
On</span></td>
<td width="13%">Mark Obtained</td>
<td width="35%">Comment</td>
<% While not rsTugasan.eof %>
</tr>
<tr>
<td width="17%"><%= rsTugasan ("MatricNumber"
<input type="text" name="NoMatrik" value="<%=rsTugasan("MatricNumber"
</td>
<td width="11%"><%=rsTugasan("NamaPel"
<td width="14%"><%= rsTugasan("NamaFail"
<td width="10%"><%= rsTugasan("TarikhHantar"
<td width="13%">
<input type="text" name="Markah2" size="5" >
</td>
<td width="35%">
<textarea name="textarea" cols="-3" style="width:220px;height:50px" >
</textarea>
<% rsTugasan.movenext
wend
rsTugasan.movefirst
%>
</td>
</tr>
<tr>
<td width="17%"><%=b%></td>
<td width="11%"> </td>
<td width="14%">
<input type="hidden" name="Markah" value="<%=b%>" >
</td>
<td width="10%"> </td>
<td width="13%"> </td>
<td width="35%">
<input type="submit" name="Submit2" value="Update">
</td>
</tr>
</table>
2) coding of request form
<%
session("AsgnCode"
b=session("AsgnCode"
response.write b
NoMatrik=request.form("NoMatrik"
response.write NoMatrik
markah = request.form("Markah2"
SQL= "UPDATE Tugasan SET "
SQL = SQL + "Markah='" & markah & "'"
SQL = SQL + "where AsgnCode='"& b &"' "
set RS=objConn.Execute(SQL)
objConn.close
set objConn=Nothing
%>
thanks...