Oracle Integer type/DBNull processing method, oracledbnull

Source: Internet
Author: User

Oracle Integer type/DBNull processing method, oracledbnull

1. I used to think that integer = number (10,126) -- 38 is the maximum precision of number integer is a super large data type, the maximum value can be expressed as power) -1 because one byte represents a maximum of 256, N Bytes represents a maximum of 256, n)> = power (10,126) n = 53, and an integer represents a minimum of 53 bytes. Therefore, the Integer type should be used as few as possible, and such a large number is rarely used. In particular, some people process the boolean type. Because the Oracle table structure does not have the boolean type, many people simply replace the boolean Type with integer, which is a bit extravagant ". Generally, char (1) indicates a Boolean string; '0' indicates false, and '1' indicates the toString method in true2.VB. DBNull is converted to an empty string. DBNull cannot be converted to String. The custom function is public static string GetDBString (object obj) {if (! (Obj is DBNull) {return (string) obj;} else {return string. Empty ;}}

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.