I have been reading JSP books for a while. It looks quite simple. At least not that difficult. It is not much different from. net.
but an error occurred when I wrote Code based on the example in the book.
I use netbeans6, which is much inferior to Visual Studio and is not as easy as the latter. Maybe I'm not used to it.
I downloaded the SQL Server2000 driver and copied the three. Jar files to WEB-INF/lib. Write the code and test it.
The following describes my problems:
1. The prompt is "com. microsoft. JDBC. sqlserver. sqlserverdriver
class. forname ("com. microsoft. JDBC. sqlserver. sqlserverdriver "). newinstance ();
I don't know what's going on after thinking about it for a long time. Later I thought about whether it was case-sensitive. Because what I see in the book is in upper case. A try.
I originally thought the case in the string should be case insensitive.
2. After the preceding modification, the system prompts [Microsoft] [sqlserver 2000 driver for JDBC] Error establishing socket.
I have been online for half a day. I learned that the cause of this error is that I cannot establish a connection to SQL Server. There are many reasons, such as IP errors, port errors, and SQL Server server not being started.
another reason is that SP3.
3. The following message is displayed: the object name 'table _ name' is invalid.
The name of the table is clearly correct. But it is wrong.
After half a day, I created a new Login Name and replaced the original SA account. OK .!!!
Haha, I cannot figure it out! The one who knows why can tell his brother.