Exception underlying input stream returned zero bytes Solution

Source: Internet
Author: User

             Exception underlying input stream returned zero bytes Solution

        System Environment
        SQL Server 2000SP3 version
        JDBC driver MS
        During this time, I have been working on an ERP system, and this problem has always plagued me. There is a field data type in the database table that is text. When I read data from the database, this error always occurs on JSP pages. [Microsoft] [sqlserver 2000 driver for JDBC] underlying input stream returned zero bytes exception. From the information collected on the Internet, this is a JDBC bug,A "null" value and an "" (empty) cannot be stored in text fields.. This error always occurs when I read data from the database.

        In desperation, I had to ask Google for help. The specific method is as follows:
        [Solution: You can set the default value of a field in the table structure to "" (one char)]

        But after I changed it, the error still persists. In desperation, there is no way to upgrade the database to SP4 and use sql2005 for JDBC. But the problem still exists. It is depressing.

        This problem was not solved for several days. After I changed the text field to ntext, the miracle came into being. the error is missing. no need to express your joy. I hope Microsoft can solve this problem earlier. I have lost my temper due to this bug. Fortunately, it has been solved now.

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.