barcode generator in c# windows application codeproject C H APTE R 7 SO JUST WH AT S HA PPE NIN G H ERE in Font

Generating PDF-417 2d barcode in Font C H APTE R 7 SO JUST WH AT S HA PPE NIN G H ERE

C H APTE R 7 SO JUST WH AT S HA PPE NIN G H ERE
PDF 417 Generator In None
Using Barcode drawer for Font Control to generate, create PDF417 image in Font applications.
www.OnBarcode.com
Encoding European Article Number 13 In None
Using Barcode generator for Font Control to generate, create EAN13 image in Font applications.
www.OnBarcode.com
Listing 7-10. A Table Package Body for Object Table DEBUG_OT, debug_ots.pkb 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 create or replace package body DEBUG_OTS as /* debug_ots.pkb by Donald J. Bales on 12/15/2006 Object Table DEBUG_OT's package */ -- Declare a table type and then table to hold the -- enabled program units TYPE program_unit_table is table of varchar2(1) index by varchar2(30); t_program_unit program_unit_table;
USS Code 39 Encoder In None
Using Barcode creation for Font Control to generate, create Code 3/9 image in Font applications.
www.OnBarcode.com
Barcode Generation In None
Using Barcode encoder for Font Control to generate, create Barcode image in Font applications.
www.OnBarcode.com
PROCEDURE disable( aiv_program_unit v_program_unit
UPC Code Maker In None
Using Barcode encoder for Font Control to generate, create GS1 - 12 image in Font applications.
www.OnBarcode.com
Code 128 Code Set C Drawer In None
Using Barcode drawer for Font Control to generate, create Code 128 Code Set B image in Font applications.
www.OnBarcode.com
varchar2) is varchar2(30);
Data Matrix 2d Barcode Maker In None
Using Barcode maker for Font Control to generate, create ECC200 image in Font applications.
www.OnBarcode.com
USS Codabar Generator In None
Using Barcode drawer for Font Control to generate, create USD-4 image in Font applications.
www.OnBarcode.com
begin v_program_unit := upper(aiv_program_unit); if t_program_unit.exists(v_program_unit) then t_program_unit.delete(v_program_unit); end if; end disable;
PDF-417 2d Barcode Generator In None
Using Barcode maker for Office Word Control to generate, create PDF417 image in Office Word applications.
www.OnBarcode.com
Generate PDF 417 In Visual C#
Using Barcode drawer for Visual Studio .NET Control to generate, create PDF-417 2d barcode image in .NET framework applications.
www.OnBarcode.com
PROCEDURE enable( aiv_program_unit v_program_unit
Code 39 Extended Generator In Visual Studio .NET
Using Barcode drawer for ASP.NET Control to generate, create ANSI/AIM Code 39 image in ASP.NET applications.
www.OnBarcode.com
EAN 128 Creation In VS .NET
Using Barcode maker for VS .NET Control to generate, create UCC-128 image in VS .NET applications.
www.OnBarcode.com
varchar2) is varchar2(30);
Creating USS Code 128 In VS .NET
Using Barcode encoder for ASP.NET Control to generate, create Code 128 Code Set A image in ASP.NET applications.
www.OnBarcode.com
EAN13 Drawer In Java
Using Barcode generation for Java Control to generate, create EAN 13 image in Java applications.
www.OnBarcode.com
begin v_program_unit := upper(aiv_program_unit); if not t_program_unit.exists(v_program_unit) then t_program_unit(v_program_unit) := NULL; end if; end enable;
Encode Code 39 Full ASCII In None
Using Barcode creator for Microsoft Word Control to generate, create Code39 image in Microsoft Word applications.
www.OnBarcode.com
Make Matrix 2D Barcode In VS .NET
Using Barcode creation for ASP.NET Control to generate, create Matrix Barcode image in ASP.NET applications.
www.OnBarcode.com
CH APT ER 7 SO JUS T WH A T S H APPENI NG H ERE
Barcode Creator In Java
Using Barcode generation for Java Control to generate, create Barcode image in Java applications.
www.OnBarcode.com
Creating Barcode In .NET
Using Barcode generation for .NET Control to generate, create Barcode image in Visual Studio .NET applications.
www.OnBarcode.com
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
Paint Barcode In Objective-C
Using Barcode generation for iPhone Control to generate, create Barcode image in iPhone applications.
www.OnBarcode.com
Draw QR Code JIS X 0510 In Visual Basic .NET
Using Barcode drawer for .NET framework Control to generate, create Denso QR Bar Code image in Visual Studio .NET applications.
www.OnBarcode.com
PROCEDURE set_text( aiv_program_unit aiv_text v_program_unit
in in
varchar2, DEBUG_OT.text%TYPE) is varchar2(30);
begin v_program_unit := upper(aiv_program_unit); if t_program_unit.exists(v_program_unit) then DEBUG_O.set_text(v_program_unit, aiv_text); end if; end set_text;
end DEBUG_OTS; / @be.sql DEBUG_OTS; Let s take a detailed look at Listing 7-10: Lines 10 and 11 declare a PL/SQL table TYPE indexed by a varchar2. You couldn t do this with older versions of Oracle, but you can now. I m taking advantage of that fact, so PL/SQL can do the work, instead of me writing a lot more code. Line 13 declares an enabled program unit list table, which will temporarily hold a list of program units for which to log debug information to table DEBUG_OT. Lines 16 through 27 implement method disable(). This method looks to see if an entry exists in the enabled program unit PL/SQL table for the specified program unit. If it does exist, it deletes the PL/SQL table entry, effectively disabling debug logging for the specified program unit. Lines 30 through 41 implement the enable() method. This method looks to see if an entry exists in the enabled program unit PL/SQL table for the specified program unit. If it does not exist, the method adds an entry to the PL/SQL table, effectively enabling debug logging for the specified program unit. Lines 44 through 56 implement the set_text() method. This method simply calls the autonomous procedure set_text() in the underlying TYPE DEBUG_O if the program unit in question is enabled.
Big deal so what you say. The implications are staggering. You can add DEBUG_OTS. set_text() calls to your long-running or complicated PL/SQL programs and leave them there to be enabled as needed when trouble rears its ugly head! Listing 7-11 is a test unit for package DEBUG_OTS that turns debug logging on then off, repeating the same test twice.
C H APTE R 7 SO JUST WH AT S HA PPE NIN G H ERE
Listing 7-11. A Test Unit for Package DEBUG_OTS, debug_ots.sql 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 rem debug_ots.sql rem by Donald J. Bales on 12/15/2006 rem A test unit for type DEBUG_O's package declare begin -- Enable debug output DEBUG_OTS.enable('DEBUG_OTS.SQL'); -- Test DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'before the loop '); for i in 1..10 loop DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'loop '||to_char(i)||' before sleep'); SYS.DBMS_LOCK.sleep(3); DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'loop '||to_char(i)||' after sleep'); end loop; DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'after the loop '); -- Disable debug output DEBUG_OTS.disable('DEBUG_OTS.SQL'); -- Test DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'before the loop '); for i in 1..10 loop DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'loop '||to_char(i)||' before sleep'); -- SYS.DBMS_LOCK.sleep(3); DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'loop '||to_char(i)||' after sleep'); end loop; DEBUG_OTS.set_text('DEBUG_OTS.SQL', 'after the loop '); end; /
Given that you have your unique session ID and start debug_ots.sql in session 1, and then switch to session 2 and query table DEBUG_OT with debug_ot.sql, you ll see output like this: SQL> @debug_ot.sql 01800B510001 old new 4: where 4: where unique_session_id = upper('&unique_session_id') unique_session_id = upper('01800B510001')
ID ---------225 226 227 228
TEXT ---------------------------------------------------before the loop loop 1 before sleep loop 1 after sleep loop 2 before sleep
Copyright © OnBarcode.com . All rights reserved.