1st, you've left out important code. Which line is 105? We need to know that to see the error.
2nd:
Quote:
<%
sqlString = "select * from jenny where ID =" & ID
Student name: <input type="text" name="name" value="<%=Student_name%>"><br />
Country: <input type="text" name="country" value="<%=country%>"><br />
Phone: <input type="text" name="phone" value="<%=phone%>"><br />
Email: <input type="text" name="email" value="<%=email%>"><br />
|
The above has an open ended <% with none closing. Like NikkiH stated, ID is not defined. It won't carry over from the previous page, unless it was submitted in a form, sent over the querystring, or stored in a session, in which case you'll need to use the Request method for retrieving the value. I also don't see where the Student_name, country, phone, and email variables are being set.
3rd:
Quote:
<%
sqlString = "update jenny set " &_
"Student name ='" & fixStr( Student_name ) & "', " &_
"Country ='" & fixStr( Country ) & "', " &_
"Phone ='" & fixStr( Phone ) & "', " &_
"Email ='" & fixStr( Email ) & "' where ID =" & ID
dbCon.Execute sqlString
%>
|
The above should be at the top of your page after the form has been submitted to update the values. You would also need to retrieve those values using Request.Form. And last, it's good practice to never use spaces in your field names. If you do, you need to enclose the field with [] brackets, i.e. [Student Name]. However, it's just easier to never use spaces and use underscores instead to break up field names.
-Shane