Qhov txawv ntawm Pragma Exception_init thiab Raise_application_error yog dab tsi?
Qhov txawv ntawm Pragma Exception_init thiab Raise_application_error yog dab tsi?

Video: Qhov txawv ntawm Pragma Exception_init thiab Raise_application_error yog dab tsi?

Video: Qhov txawv ntawm Pragma Exception_init thiab Raise_application_error yog dab tsi?
Video: Qhov Txawv Ntawm Lus Hmoob Thiab Lus Mab Mawb 2024, Kaum ib hlis
Anonim

pragma exception init hloov qhov yuam kev Oracle rau hauv lub npe tshwj xeeb. Yog tias kev ua haujlwm database nce ib qho ORA-00054 "peev txheej tsis khoom", koj yuav tsum tau code:. Raise_application_error yog siv los RAISE qhov yuam kev - kev zam_init yog siv los daws qhov yuam kev (Kuv twv koj tuaj yeem hais tias lawv yog qhov sib txawv hauv a txoj kev).

Tom qab ntawd, Pragma Exception_init yog dab tsi?

EXCEPTION_INIT Pragma . Cov pragma EXCEPTION_INIT koom nrog lub npe tshwj xeeb nrog tus lej yuam kev Oracle. Koj tuaj yeem cuam tshuam ib qho ORA- yuam kev thiab sau ib tus neeg tuav haujlwm tshwj xeeb rau nws es tsis txhob siv lwm tus neeg tuav haujlwm. Ib qho kev zam rau tus neeg siv tau tshaj tawm nyob rau hauv qhov tam sim no.

Tsis tas li ntawd, qhov sib txawv ntawm kev nce thiab nce daim ntawv thov yog dab tsi? RAISE_APPLICATION_ERROR yog tus txheej txheem built-in los ntawm Oracle uas tsa ib yuam kev nrog tus lej thiab cov neeg siv nkag siab yuam kev lus. Qhov no pab cov neeg siv los ua haujlwm ntawm kev daws teeb meem ntawm yuam kev nyob rau hauv feem ntau tshwj xeeb thiab yog txoj kev. Raise_application_error qhia daim ntawv thov tshwj xeeb yuam kev lus. Koj tsis tuaj yeem rov- tsa nws.

Tsuas yog li ntawd, Raise_application_error yog dab tsi?

Teb: Cov nce_application_error yog qhov ua tau raws li txheej txheem teev tseg los ntawm Oracle uas tso cai rau tus tsim tawm los tsa qhov kev zam thiab koom nrog tus lej yuam kev thiab cov lus nrog cov txheej txheem. Oracle muab cov nce_application_error txheej txheem tso cai rau koj los tsa tus lej yuam kev hauv koj daim ntawv thov.

Hom kev zam Pragma yog dab tsi?

Qhov 5 hom ntawm Pragma Cov lus qhia muaj nyob hauv Oracle tau teev tseg hauv qab no: PRAGMA EXCEPTION_INIT : Cov lus qhia no khi ib tus neeg siv txhais kev zam mus rau tus lej yuam kev. PRAGMA INLINE: (Qhia hauv Oracle 11g) Cov lus qhia no qhia tau hais tias kev hu xov tooj rau subprogram yog lossis tsis yog nyob rau hauv.

Pom zoo: