Comments on the JSP-MySQL Exercises
Problems Encountered and Solutions
First of all, I should create the table. I followed the materials and still got puzzled. I had no idea where to create the table and where and how to show it. It was Sylevie who showed me step by step how to do it all. The steps are:
mysql> use staf2x;
One problem I met with table is that each time I executed the program, there was always a message as: Error during Qurry: Unexpected Exception: java.sql.SQLException message given: General Error: Column count doesn't match value count at row 1. It puzzled me two days. In the end, when I read again the code of the example, I found that in the table, 'id' is automatic, it does not count as a value. Thus there were three colunms in the table I created instead of four as I thought. So I added another colunm and it works now.
Another problem I met is that I intended to put the last three into the same file. I succeeded but it appeared not so well. There was always some sort of feedback before any data were inserted. So I divided it into three in the order of : insert data-----show feedback-----show table. It looks better in this way.