Problems encountered when connecting to SQL Server 2000 through JSP

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.