How can I mount types defined by the user of the package?

I have two types of similar packages (gt_Teste) in two different packages.

How can I mount types defined by the user of the package?
(I shouldn't want to made a new statement va_Teste2 pkgl_lu2.gt_teste due to the desire to increase memory allocation)

------------------------------------------------------------------------------------------
-ANONYMOUS BLOCK
------------------------------------------------------------------------------------------
declare
va_Teste pkgl_lu1.gt_teste;
va_Teste2 pkgl_lu2.gt_teste;
Start
--
pkgl_lu1.prcl_init (va_Teste);
pkgl_lu1.prcl_print (va_Teste);

+/*
-I don't want to do it because of memory allocation:
Because me in va_Teste.First... va_Teste.Last loop
va_Teste2(va_Teste2.Count+1): = va_Teste (i);
End loop;
*/+

pkgl_lu2.prcl_print (CAST (va_Teste AS pkgl_lu2.gt_Teste));
end;
/

------------------------------------------------------------------------------------------
-PACKAGE PKGL_LU1
------------------------------------------------------------------------------------------
create or replace package pkgl_lu1 is
type gt_teste is table of index varchar2 (100) by simple_integer;

procedure prcl_init (pi_teste in out nocopy gt_teste);
procedure prcl_print (pi_teste gt_teste);
End;
/

create or replace package body is pkgl_lu1
---------------------------------------------
procedure prcl_init (pi_teste in out nocopy gt_teste)
is
Start
pi_teste (pi_teste.count + 1): = 'A ';
pi_teste (pi_teste.count + 1): = 'B ';.
pi_teste (pi_teste.count + 1): = 'C ';
pi_teste (pi_teste.count + 1): = ';
end;
---------------------------------------------
procedure prcl_print (pi_teste gt_teste)
is
Start
I'm in pi_teste.first... pi_teste. Last loop
dbms_output.put_line (pi_teste (i));
End loop;
end;
End;
/

------------------------------------------------------------------------------------------
-PACKAGE PKGL_LU2
------------------------------------------------------------------------------------------
create or replace package pkgl_lu2 is
type gt_teste is table of index varchar2 (100) by simple_integer;
va_teste gt_teste;

-procedure prcl_init (pi_teste in out nocopy gt_teste);
procedure prcl_print (pi_teste gt_teste);
End;
/

create or replace package body is pkgl_lu2
procedure prcl_print (pi_teste gt_teste)
is
Start
I'm in pi_teste.first... pi_teste. Last loop
dbms_output.put_line (pi_teste (i));
End loop;
end;
End;
/

I see, well it's unfortunate bloody.

Ideally you would have a package (utility package or something) with objects like that, that can be shared between the development environment, unless you never have an interface code (each package is entirely distinct from all other packages, and honestly, it's not likely to happen).

I guess that your only option (I think) If you are concerned with memory usage would be to remove the table while assigning a new.

For i In va_Teste.First..va_Teste.Last
Loop
  va_Teste2(va_Teste2.count+1) := va_Teste(i);
  va_Teste.DELETE(i);
End Loop;

Tags: Database

Similar Questions

  • call a procedure of package DB type complicated if the type defined in the package itself

    Hello world

    I use jdev 11.1.1.7.0

    I defined a package of data with a procedure and internal two types as follows:

    Create Or Replace Package Db_Package As 
    
    Type rec Is Record(Rec_Type Varchar2(10), Rec_Desc varchar2(10) );                        
    Type recordList Is Table Of rec;
    
    Procedure Test_Procedure(p_out out recordList);
    END db_package;
    
    
    

    evil

    I want to call this procedure in the module of the application. I know how to call a procedure or function db AM,

    but in this case that I've defined two types in the package itself and I use one of these types as to the procedure output parameter, I had a problem.

    below is the example of code to call the db procedure, but it does not work because the plsqlBlock.registerOutParameter () setting will not

            CallableStatement plsqlBlock = null;
            String statement = "Begin DB_PACKAGE.Test_Procedure(:1); END;";
            try {
                plsqlBlock = getDBTransaction().createCallableStatement(statement, 0);
                plsqlBlock.registerOutParameter(1, OracleTypes.ARRAY);// it doesn't work
                plsqlBlock.executeUpdate();
                Object object = plsqlBlock.getObject(1);      
    
    
            } catch (Exception e) {
                e.printStackTrace();
            }
    
    
    
    

    I know that if I set the types of packets (rec, recordList) as types of oracle (instead of setting in the packaging itself) so I can call the procedure with success, in this case I should use below:

    plsqlBlock.registerOutParameter(1, OracleTypes.ARRAY,"Recordlist");
    

    but I wonder how you can call a procedure from the package if the types defined in the package itself.

    Kind regards

    Habib

    JDBC supports the types of oracle level package only from 12 c database and jdbc driver ojdbc7 (which requires java 7).

    Dario

  • How can I score points defined by the user in amplitude / frequency diagram?

    I have a table of frequencies and amplitudes. I need these values to display frequency values on the x axis and axis is amplitude. a default fixed parcel must be constantly visible in the graph, and then I want to score a few points defined by the user in the same graph, save these two plots in the same graph and then make a mark on the chart.

    Help kindly it's about my master of engineering project where I am trying to biuld an audiometer (to test hearing sensitivity) and I'll interface with microcontroller ardiuno labview and my hardware devices.

    so kindly help.

    Thank you.

    rich

    The points defined by the user might just be another plot.  You can add annotations to a conspiracy, but it's a lot of work.

  • How can I control type size during the generation of the legends of the links palette?

    Using my InDesign CS5 Classroom In A Book, when I ' generate static captions ", the captions appear fine, but they are point 12 type, rather than the modest 6-point type shown in the example in the book. I know that I can go into these blocks and change the size, but the example me to believe son type isn't supposed to get out that big. I'm doing something wrong, or the book just leave out the fact that the blocks must be changed manually? (For those who have the manual, I'm talking about "Add metadata captions to graphic blocks" at page 113). Thanks for any help you may be able to offer.

    Tom

    Just thought that he out - did not notice that I was not set the style for paragraph of "Photo Credit". Problem solved!

  • How can I get a query in the search field to open in a new tab or a new window, and the current window?

    How can I get a query in the search field to open in a new tab or a new window, and the current window?

    If you are looking through the search bar in the Navigation toolbar, this preference can be changed to research it open in a tab.

    Type of topic: config in the address bar and press ENTER. Then answer "I'll be careful." Type this pref in the search at the top.

    Browser.Search.openintab = double click to switch to true

  • Once an unapproved site is added as an exception, how can I go back and delete the exception later?

    Once an unapproved site is added as an exception, how can I go back and delete the exception later?

    Thank you, Jefferson. You addressed the issue beautifully and delightfully complete.

    I found and deleted the server where I got the exception.

    "In the future, I suggest, by making an Exception, uncheck the box that adds a permanent exception. In this way, when you exit Firefox, the exception is removed automatically. »

    AHA. It's very good to know. I missed it when granting the exception today.

    The exception I gave (and now deleted) today wasn't really a risky site. I know the owner. Just a little problem in their relationship.

    Thanks again. And thanks Toddy... I did not say clearly what type of exception.

  • I often get frequent blue screens on internet sites. Blue screen too fast for me to record specific error message. How can I put an end to the blue screen to get the error message?

    frequent blue screens often to internet sites.  Blue screen too fast for me to record specific error message.  How can I put an end to the blue screen to get the error message?

    en blue screen too fast for me to record specific error message.  How can I put an end to the blue screen to get the error message?

    If your computer is restarted when the BSOD appears, then you must change the by default for what to do in case of system error. It is easy to do, but takes a lot of mouse clicks to get there:

    Start | Control Panel | System | Advanced system settings (need for credentials for the administrator to spend here |) Advanced | Startup and recovery / settings.

    On this screen, uncheck the box under system failure that says automatically restart. The next time the BSOD appears, your computer will not do anything else until you press the reset button, so you'll have all the time you need to read and copy the error codes. Paste here, verbatim, and someone should be able to point in the right direction.

    ``````~~~~`````

    In the control panel choose reports on problems and Solutions (problem of type in the START search box), go to historical problem, right-click your error and choose check for the Solution. You can also examine the details.

    In administrative tools, choose the reliability and performance monitor and click on MonitoringTools then the reliability monitor (type reliability in research on Start). This list is a chart of the software installs, uninstalls, updated Windows and crashes by date. See if your plant has started to happen after you installed or uninstalled something.

    It may be useful to eliminate equipment defects

    Type of memory in the search box of start and choose Memory diagnosis

    In a command prompt (type command in the start search box then right click and choose Run as administrator) type

    CHKDSK c: /r

    If you have more than one drive replace C: with the other drive letters.

    Search for corrupted files by typing at the command prompt

    sfc/scannow

    You can clean boot troubleshooting http://support.microsoft.com/kb/331796

  • How can I uncheck "read only" in the download folder in a way that it will remain disabled

    How can I uncheck "read only" in the download folder in a way that it will remain disabled

    If done through properties does not stick, have you tried running the command attrib-r at the command prompt?

    Click Start, click run, type cmdand press ENTER.
    To view the syntax for the Attrib command, type attrib /? at the command prompt.

    Check MS article for more details.
    You cannot view or change the read-only or system attributes:
    http://support.Microsoft.com/?ID=326549

    I guess that you are authorized to make changes on this file, if it does not play here.
    How to set, view, change, or remove special permissions for files and folders in Windows XP
    http://support.Microsoft.com/kb/308419

  • How can I remove an item in the impression that who refuse to cancel?

    How can I remove an item in the impression that who refuse to cancel? It keeps me to print anything else.

    Hello

    I think that you need to remove the tail. For Windows, try it please:

    • Hold down the Windows key and press R.
    • from the run window, type services.msc and press to enter.
    • If the computer asks you to Admin, you have to accept that,
    • regarder watch down to the print spooler service, right-click and select Properties
    • Click the Stop button,
    • Go to C:\Windows\System32\Spool\printers
    • delete the job inside this folder
    • restart the machine.

    Kind regards.

  • How can I get this question to the right person in Sony cameras?

    How can I get this question to the right people in the Sony cameras?  The main site contact form does not have a pre-sales question:

    I intend to buy a digital SLR type that has at least 24 million pixels, 4K recording/storage/exit offers video, Wi - Fi, objective interchangeable with anti-shake zoom function and which allow me to save my pictures in full form, so that I can view in 4 K on a Sony 4 K TV.
    Looking at the picture of the cameras is intimidating.  I prefer Sony.  Can you point me to one of your cameras that meet my needs?  If there is on the way before the month of may of the next year, please let me know about that as well.  In addition, I don't want the so-called very high prices of professional cameras, namely $5K or more.  Thank you.

    With regard to a DSLR with 4 k video, no again.
    Will there be one in the future? Yes there will be.
    When? No idea yet.

    The closest thing that currently holds the Sony is the Sony RX10ii

    DSLR body, 4 k video, built in an optical (in lens), wifi/NFC, stabilizer etc.

    However, it is only 20mp and it uses not interchangeable objectives.
    It's lens located between however 18-200mm (35mm equivalent)

    Finally, it's only a 1 "sensor, so don't expect a quality digital SLR image, but quality located near DSLR quality nonetheless.

  • How can I include my printer in the "homegroup"?

    How can I include my printer in the "homegroup". I had a popup come on the screen indicating that all network devices should I include in my home group. I was offered the possibility to print msge but it wouldn't print. It offered no guidance on how to accomplish said feat. It prints fine w/usb cord but not network print.

    Hi Gerald,

    Thanks for posting your query in Microsoft Community.

    There could be several reasons for this cause. We will try these steps and check.

    Step 1:

    http://Windows.Microsoft.com/en-us/Windows7/share-a-printer

    http://Windows.Microsoft.com/en-us/Windows7/access-files-and-printers-on-other-HomeGroup-computers

    http://Windows.Microsoft.com/en-us/Windows7/file-and-printer-sharing-frequently-asked-questions

    Step 2:

    Find and install printer drivers
    http://Windows.Microsoft.com/en-us/Windows7/find-and-install-printer-drivers

    Step 3: Manually add the printer to the local port.

    a. go to control panel and click on devices and printers.
    b. click Add a printer, and then select Add a local printer. Click on create a new port. The default value in the drop-down list is Local Port. Don't change that.
    c. click Next.
    A dialog box appears for you request that you enter a port name. Type the name of \\computer name\printer.
    d. type your user name and the name of the printer (name \\PC\printer)
    e. click ok and exit.

    Update the drivers for your printer.

    Updated a hardware driver that is not working properly:
    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    If the problem persists, then manually add the printer to the local port.

    Hope this information is useful. Please feel free to answer in the case where you are facing in the future other problems with Windows.

  • When I did this it called my disabled factory or pirated disk. How can I take my PC off the product key and got my other PC for its use?

    I have Windows 7 Professional.  Used it on my PC and then I had to buy a new Dell computer, as my old PC blew the motherboard.  The new Dell came with 8.1 if I want to install 7 on my wife's computer, as it did in Win98.   When I did this it called my disabled factory or pirated disk.   How can I take my PC off the product key and got my other PC for its use?

    If Windows 7 Professional is pre-installed on your Dell computer, it cannot be transferred. If it is a license purchased at a retail store, he transfer rights.

    A computer running Windows 98 is perhaps not powerful enough to run Windows 7.

    * 1 gigahertz (GHz) or faster 32-bit (x 86) or 64-bit (x 64) processor

    * 1 gigabyte (GB) of RAM (32-bit) or 2 GB RAM (64-bit)

    * 16 GB of disk space available (32-bit) or 20 GB (64-bit)

    * Peripheral figure DirectX 9 with WDDM 1.0 or higher driver

    How to transfer a retail license.

    Click Start, type: CMD
    Right-click on CMD
    Click on run as administrator
    At the command prompt, type: slmgr.vbs - upk

    Press enter, this will uninstall the product key of the computer and to the evaluation mode, you are now free to use it on another computer. If you experience problems, try to activate by phone:
    Activate Windows 7 manually:
    1. click on start and in the search for box type: slui.exe 4

    2. press enter on your keyboard

    3. Select your country.
    4. Select the telephone activation option and brace yourself for a real person.

  • How can I activate my wifi on the use of cmd card?

    How can I activate my wifi on the use of cmd card?

    Hello Siphomangena,

    Thanks for posting your query in Microsoft Community Forum.

    If you want to enable the Wi - Fi adapter, try the following steps. However, it does not activate or disable the driver of network installed on your computer.

    1. Go to Start, click all programs and open the Accessories.
    2. Right-click on command prompt in the list programs, and then select run as administrator. If you are prompted for an administrator password or for confirmation, type your password, click OK, or alternatively, click Yes.
    3. In the command prompt, type the following command and press ENTER:
      netsh interface set interface name ="Local area connection"enable

      Note: replace the Local network connection with the name of your card, for example, the wireless network connection.

    4. This allows you to Wi - Fi adapter.

    Corollary: Replace 'activate' with 'disable' in the command in step 3 to disable the Wi - Fi adapter.

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • How can I remove picture libraries in the app photo 8 of widows?

    How can I remove image libraries in the application of photo of windows 8?

    If you are on a desktop or laptop computer, it's easy. Just go to the start screen, type in the search bar 'photos', and then click the folder in which the photo you want to delete is in. Then left click on the photo you want to delete and press 'delete '. You will see the picture that you want to remove is gone. Simple! Hope this has helped.

  • How can I move my head in the exact measurements of time?

    Relatively new to AE and want to know how can I move my head in the exact measurements in time.

    For example in a 59.94 project, I am to 01:00:14 and want to return 36 executives. In Premiere Pro I just type "-36" and I jump back 36 frames.

    I tried in AE and it went to 36 images in the comp. basically before my ever started time line. I tried '. ' " "" ' 0.36 ' "36.0036"with identical results back to-36 before the beginning of the model.

    Does anyone have a solution? I can't find it in the manual.

    Thanks in advance

    of after effects using:
    "To move forward some time or number of frames, click the display of the moment and then enter a plus sign (+) followed by the timecode or number of frames to advance." For example, enter + 20 to go forward 20 images or 01:00 to go forward one second. Precede the value with the sign (-) to go back. For example, enter +-20 to go backward 20 frames or + - 1:00 to go back a second. »

Maybe you are looking for