C #. NET development common exception handling based on Oracle Database System

Source: Internet
Author: User

Note: use single-step debugging to identify errorsProgramStatement
<1> XXX dynamic link library not registered
(The dynamic link library file is not registered or the class library of this method does not exist)

<2> the object settings are not referenced to the object instance.
(The object is not correctly assigned a value. You can check the parameter value and reference uninitialized variables)

<3> "mydelegate" is an ambiguous reference
(A delegation of the same name appears on a namespace node of the same level)

<4> parallel transactions are not supported.
(The new transaction is not committed or the transaction execution is incomplete. Note that if a return statement exists before the transaction is committed, the transaction must be committed before return)

<5> ora: The expected from keyword is not found.
(Keyword conflict in SQL statements)
(Spaces are not reserved before the from character)

<6> the string format does not match
(The integer type parameter in Oracle can be replaced by a string, but the varchar type parameter must be of the string type in the Application)
(The parameter conversion is incorrect. The parameter type does not match the data table field type)

<7> the expression is missing/the expected keyword from is not found
(SQL statement error)
(You can use Quick monitoring to view the execution of variables)
(The as keyword cannot be used in Oracle to give table aliases. You can remove the as keyword)
(Conversion error. For example, char should be to_char. For more information, see OracleTechnical materials)

<7> SQL command ended incorrectly
(Parentheses or other identifiers are missing)

<8> current Timestamp
(1) Change to current_timestamp.
(2) The table alias only needs to be: Select * From tablename A, and cannot be written as: Select * From tablename as
(3) to_char (char), to_number (INT), to_date (date)

<9> dual replaces sysibm. sysdummy1 in IDM DB2 and uses to_date to replace timestamp.
When specifying a data source for the combo box, put the data source in front, such as CMB. datasource = datasource; CMB. displaynumber =...
<10> An error occurred while calling the stored procedure. The number or type of parameters is incorrect.
(Check whether the parameter name, value, type, length, and outgoing direction are consistent with the stored procedure parameters. Check carefully. Otherwise, an error may occur and the entire process is incorrect. You have encountered a 36-parameter stored procedure once. The system prompts the above error because of an error in one parameter name.

<11> During the stored procedure, the inserted column is too large!
(The parameter length is too small, or the referenced string does not remove spaces)
<12> Add n hours to current_timestamp
Select current_timestamp + N/24 from dual

<12> specify a data source for the combo box. All attributes are normal, but they cannot be displayed!

For details, see the troubleshooting process of a rare C # exception.
<13> lack of proper references and assembly. How strange is it that I have added it?
(1) Internal System error. Turn off the development environment and restart it!
(2) The referenced name is case-insensitive!

<14> "control" is an ambiguous reference.
(1) A class with the same name appears in the namespace recognized by the system. For example: system. Windows. Forms. Textbox, mytest. textbox
(2) Specify the full name of the namespace in detail. You cannot reference it with textbox because the system does not know which textbox you want to reference.

<15> The Date Format Image ends before the entire input string is converted.
(1) This is usually because of such statements in the program: Cast (djrq as char (10) | ''' | cast (djsj as char (10 ))
(2) should be changed to: to_date (to_char (djrq, 'yyyy-mm-dd') | ''| to_char (djsj, 'hh24: MI: ss '), 'yyyy-mm-dd hh24: MI: ss ')

<16> service name that cannot be processed
(1) This is usually because the connection string is incorrect, or the name of the folder where the application is located is incorrect, so you cannot log on to the Oracle server.
For example, if the folder is named AAA (dd) and so on, and such a name containing a combination of non-letters and numbers, this exception occurs. Pay special attention to this exception.

<17> OCI: 20053 overflow error
(1) This is usually because the decimal point of the numeric type is too long, and the fill () method of the adapter throws an exception. The solution is to use the round function to limit the length of decimal places, for example, round (1/6, 3.

<18> the value exceeds the range.
(1) This usually occurs in data conversion. The length of the conversion setting is smaller than the length of the value itself, resulting in an exception thrown by the fill () method of the adapter. The solution is to convert the string to cast (variable as varchar (100) and try to exceed the length of the original variable.

<19> Oracle service unavailable, prompt: Oracle unavailable. Shared Memory realm does not exist
(1) Open SQL plus worksheet, log on as the database administrator (connect sys/X # $ YH & # @ o $ radb as sysdba), enter startup, and execute. Everything is OK! (2007-3-6)

<20> the update statement cannot be executed. The prompt is: no prompt is displayed, and the program seems to be dead (no exception is thrown)
(1) This is usually because you have performed an update on the table on P/lsql but have not submitted it. As a result, you have locked the table outside the program, therefore, when updating the table in the program, there will be no time-limited waiting. The solution is to disable P/lsql and unlock the lock. (2007-3-12)

<21> crystal report prompt: Invalid report source

(1) This is usually because of an error in your reference, that is, the notorious "DLL hell" problem. The DLL of different versions of the crystal report is referenced together, resulting in an unrecognized error of the crystal report. Solution: unify the version of the referenced file. (2007-4-19)

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.