sqlcode

Want to know sqlcode? we have a huge selection of sqlcode information on alibabacloud.com

Error message and exception handling for Plsql

own definition exceptions.function (you need to define a variable to receive)Sqlcode--Returns the code number of the error and returns 0 if there is no error, you can query the official document according to the value returned by Sqlcode for a more detailed description of the errorSQLERRM--Returns the text description of the error if no error is returned to normal or successful completion, which is the off

To organize the Oracle pen questions of large companies with reference answers

are the anomalies that occur frequently? Common predefined exceptions cursor_already_open-ora-06511 SQLCODE =-6511 cursor already open dup_val_on_index-ora-00001 SQLCODE =-1 violation of uniqueness constraint invalid_cursor-ora-01001 SQLCODE =-1001 Illegal cursor operation invalid_number-ora-01722 SQLCODE =-1722

Beginner's school master common pre-defined exceptions of the Oralce Database

Common pre-defined exceptions of Oralce databases: EXCEPTION WHEN CURSOR_ALREADY_OPEN THEN -- ORA-06511 SQLCODE =-6511 the cursor has been opened WHEN DUP_VAL_ON_INDEX THEN -- ORA-00001 SQLCODE =-1 insert duplicate data into a unique index WHEN INVALID_CURSOR THEN -- ORA-01001 SQLCODE =-1001 illegal cursor operation WHEN INVALID_NUMBER THEN -- ORA-01722

Common pre-defined exceptions of oralce

ExceptionWhen cursor_already_open then -- ORA-06511 sqlcode =-6511 the cursor has been opened When dup_val_on_index then-- ORA-00001 sqlcode =-1 insert duplicate data into a unique index When invalid_cursor then-- ORA-01001 sqlcode =-1001 illegal cursor operation When invalid_number then -- ORA-01722 sqlcode =-1722 cha

Application of descriptor in dynamic SQL

Dynamic Application of descriptor in dynamic SQL Wang Guanghong The flexibility of dynamic SQL is well known, and I am here to introduce a dynamic SQL that applies descriptor: $short B_num; $char *command; $char sql[1024]; $short Flag; $date date; $long number, B_count, J; $long Prec; $long type; $long Scale; $double money; sprintf (SQL, "SELECT * from table"); $prepare qid from $Sql; if (SQLCODE) return-1; $de

C language embedded in Informix Basic introductory example to explain _c language

(strage), stdin); Trim (strage); if (strlen (strage) = = 0) return-3; Pps->age = Atoi (strage); return 0; } int main (void) { $struct _db_person dbps; $database exec01; if (SQLCODE!= 0) { printf ("Open demo1 failure,sqlcode=%d\n", SQLCODE); return-1; } while (1) { if (GetData (dbps) Break $insert into person (name, card, age) VALUES ($db

Comprehensive Analysis of Oracle Developer's Exception Handling Mechanism

errors returned to PL/SQL blocks during execution or Oracle errors returned by PL/SQLCodeErrors Caused by an operation, such as Zero Divisor or memory overflow. Custom exceptions are displayed and defined by developers. Information is transmitted in PL/SQL blocks to control application error handling. Every time PL/SQL violates Oracle principles or goes beyond system dependencies, internal exceptions are implicitly generated. Because each Oracle error has a number and the PL/SQL exception is

Organize class notes PL/SQL Orcale exceptions

; EXCEPTION When No_data_found and then Dbms_output. Put_Line (' No Code in database ' | | v_empno| | ' Employees '); when Too_many_rows and then Dbms_output. Put_Line (' program run Error! Use cursor '); when OTHERS and then Dbms_output. Put_Line (sqlcode| | ' ---' | | SQLERRM); END; 2> non-pre-defined exception handlingFor handling this type of exception, you must first define a non-defined Oracle error. The steps are as follows:1. Define t

How to kill all the processes under a user and drop the user

number DEFAULT 10)AsPRAGMA autonomous_transaction;Cannot_drop_user EXCEPTION;PRAGMA Exception_init (Cannot_drop_user,-1940);User_count Number: =-1;BEGINSELECT COUNT (*) into User_count from dba_users WHERE username = in_username;IF user_count = 0 ThenDbms_output. Put_Line (' User ' | | in_username | | ' does not exist. ');RETURN;END IF;For I in (SELECT Sid, serial# from v$session WHERE username = in_username) LOOPEXECUTE IMMEDIATE ' alter system kill session ' | | "' | | I.sid | | ', ' | | i.se

What types of abnormal processors are involved in DB2 stored procedures?

The following article describes how to handle exceptions in the DB2 stored procedure. In the DB2 database, if you want to use sqlcode, you must declare before the DDL statement. This is what we all need to know. The following describes the main content of this article. Handling of Stored Procedure exceptions: DECLAREhandler-typeHANDLERFORconditionhandler-action The exception Processor type (handler-type) has the following types: After the

DB2 stored procedure development best practices)

processor operation is complete, continue continues to execute the next statement after the exception statement is generated. After the processor operation is complete, exit terminates the stored procedure and returns the control to the caller. Before undo executes a processor operation, DB2 rolls back the SQL operations performed during the stored procedure. After the processor operation is complete, the stored procedure is terminated and the control is returned to the caller. Exce

Use of Pro * C

=: Book-name;Bdesc =: Book-number;}(6) SQL Communication zoneThe SQL Communication zone is described using the following statements:Exec SQL include sqlca;This section provides records of success or failure and error handling for running programs.Sqlca CompositionSqlca is a variable of the structure type. It is an interface between Oracle and applications. When executing the Pro * C program, Oracle saves the status information of each embedded SQL statement execution to sqlca. Based on this inf

Use of Pro * C

CompositionSQLCA is a variable of the structure type. It is an interface between ORACLE and applications. ORACLEStore the status information of each embedded SQL statement execution in SQLCA. Based on this information, you can determine whether the SQL statement execution is successful, the number of rows processed, and the error information, as shown in the table:Struct sqlca{Char sqlcaid [8]; ---- à identifies the communication zoneLong sqlabc; --- à length of the Communication zoneLong

DB2: Create a stored procedure using a sample application

*/ Memset (rowcode, 0, sizeof (rowcode ));Exec SQL fetch row into: rowcode;If (sqlca. sqlcode = 100 ){Exec SQL close row;Break;}Else if (sqlca. sqlcode! = 0 ){Exec SQL close row;Return (-1 );} Exec SQL open column; While (1) {/* column indicator */ Memset (columncode, 0, sizeof (columncode ));Exec SQL fetch column into: columncode;If (sqlca. sqlcode = 100 ){Exec

Oracle stored procedures, anonymous blocks, functions, packages

; v_node_templet_id td_m_node_templet.node_templet_id% type; Begin --V_NODE_TEMPLET_ID: = Please enter a node name; -This piece has not been realized, always reported the wrong v_node_templet_id: = ' bizopporder '; SELECT flow_templet_id to v_flow_templet_id from Td_m_node_templet a WHERE node_templet_id = v_node_templet_id; Dbms_output.put_line (v_flow_templet_id); EXCEPTION --when No_data_found then --dbms_output.put_line (' No data found '); When OTHERS and dbms_output.put_line (' @

Overwriting a stored procedure that disables or enables the constraints of an Oracle database

, constraint_nameFrom User_constraintsWHERE constraint_type = ' U ';BEGINDbms_output. ENABLE (buffer_size = null); ---do not limit cachingIF UPPER (operation) in (' DROP ', ' DISABLE ') thenIF FK ThenBEGINFor E in R LOOPBeginST: = ' ALTER TABLE ' | | E.table_name | | "| | Operation | | ‘CONSTRAINT ' | | UPPER (E.constraint_name);EXECUTE IMMEDIATE (ST);Dbms_output. Put_Line (ST);EXCEPTIONWhen others thenErrorCode: = SQLCODE;ErrorMsg: = SUBSTR (SQLERRM,

Developing multithreaded Applications with PRO*C

variables.//In addition, multithreading requires the following issues to be considered://Define the SQLCA structure as thread-safe. A typical practice is to define a local variable with the same name at the beginning of each function.//The SQLDA structure is also treated like the SQLCA structure.//Define the host variables in the program as thread-safe. This means being careful with global and static variables in your program.//Avoid using the same run-time context for different threads at the

A general approach to debugging stored procedures and functions in PL/SQL development

(pkg_const. DEBUG) Then Utl_file.put_line (FI, ' return: '); Utl_file.put_line (FI, ' out_curemp:unknown '); Utl_file.put_line (FI, ' usp_getempbydept end at ' | | | to_char (sysdate, ' hh24:mi:ss mm-dd-yyyy ') | | ' ******' ); Utl_file.new_line (FI, 1); Utl_file.fflush (FI); Utl_file.fclose (FI); End If; exception When others then if (pkg_const. DEBUG) Then if (Utl_file.is_open (FI)) then Utl_file.put_line (FI, ' ERROR: '); Utl_file.put_line (FI, ' Sqlco

Oracle Exception Handling

null instance when using an object type. Storage_error (ora-06500): exceeds memory space or the memory is corrupted. Sys_invalid_rowid (ora-01410): invalid string attempt to convert to rowid type. Timeout_on_resource (ora-00051): timeout error while waiting for the resource. Handle non-predefined exceptions:Oracle errors other than pre-defined in 21 described above are collectively referred to as non-pre-defined exceptions. The handling of such exceptions involves three steps: first, defining p

Export Ilma metadata.

);Ilm_toolkit.ilm_toolkit.refresh_ts_cache;End;/Prompt *************************************** *****************Prompt creating storage tier high performance...Prompt *************************************** *****************PromptDeclareRochelle tier_id number;BeginIlm_toolkit.ilm_toolkit.create_storage_tier (Rochelle tier_id,'High performance ','Very high performance disk ',Null,100,1,1,0,,,,,,,False );Ilm_toolkit.ilm_toolkit.add_tablespace (Rochelle tier_id,Null, null,'Datasml ','0 ',False );

Total Pages: 15 1 2 3 4 5 6 .... 15 Go to: Go

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.

not found

404! Not Found!

Sorry, you’ve landed on an unexplored planet!

Return Home
phone Contact Us
not found

404! Not Found!

Sorry, you’ve landed on an unexplored planet!

Return Home
phone Contact Us

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.