Problem with procedure in package

Problem with procedure in package:
create table accounts
(acno number(10),
name varchar2(20),
balance number(10,2));
create package banking is
procedure new_acct(acno NUMBER, name IN VARCHAR);
procedure acct_dep(acno IN NUMBER, amount IN NUMBER);
procedure acc_wdr(acno IN NUMBER, amount IN NUMBER);
procedure acc_bal(acno IN NUMBER, bal OUT NUMBER);
function acc_drwn(acno IN NUMBER) RETURN BOOLEAN;
end banking;
create or replace package body banking is
procedure new_acct ( acno IN number,
name IN varchar) is
begin
insert into accounts
(acno, name, balance)
values
(acno, name,0);
end;
procedure acct_dep(acno IN NUMBER,
amount IN NUMBER) is
begin
update accounts
set balance = balance + amount
where acno = acno;
end;
procedure acc_wdr(acno IN NUMBER,
amount IN NUMBER) is
begin
update accounts
set balance = balance - amount
where acno = acno;
end;
procedure acc_bal(acno IN NUMBER,
bal OUT NUMBER) is
begin
declare cursor c_balance(i_acno IN accounts.acno%type) is
select balance
from accounts
where acno = i_acno;
acc_bal accounts.balance%type;
begin
if c_balance%isopen then
close c_balance;
end if;
open c_balance(acno);
fetch c_balance into acc_bal;
close c_balance;
end;
end;
function acc_drwn(acno IN NUMBER) RETURN BOOLEAN is
begin
declare cursor c_balance(i_acno IN accounts.acno%type) is
select balance
from accounts
where acno = i_acno;
bal accounts.balance%type;
begin
if c_balance%isopen then
close c_balance;
end if;
open c_balance(acno);
fetch c_balance into bal;
close c_balance;
if bal < 0 then
return true;
else
return false;
end if;
end;
end;
end banking;
begin
banking.new_acct(123,'FRANKS');
end;
execute banking.acct_dep(123,100);
execute banking.acc_wdr(123,50);
Works fine up to this point, however when running the balance check the balance amount is not visible?
SQL> set serveroutput on
SQL> begin
2 declare
3 bal accounts.balance%type;
4 begin
5 banking.acc_bal(123,bal);
6 dbms_output.put_line('Franks balance is '||bal);
7 end;
8 end;
9 /

procedure acc_bal(acno IN NUMBER,
   bal OUT NUMBER)
is
cursor c_balance(i_acno IN accounts.acno%type) is
   select balance
   from accounts
   where acno = i_acno;
   l_acc_bal accounts.balance%type;
begin
   open c_balance(acno);
   fetch c_balance into l_acc_bal;
   close c_balance;
   bal := l_acc_bal;
end;

Similar Messages

  • Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Go to "control panel" then "add or remove programs".  Highlight "Apple software update"  Choose "change" click "Repair"  This should do the trick.  Then download and install iTunes 10.5 again.

  • Tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    I tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    Firstly, are you installing iTunes for the first time or are you updating your current version of iTunes?
    If you're installing iTunes for the first time have you tried redownloading the installer package? Perhaps the file you downloaded originally is corrupted...
    http://www.apple.com/itunes/
    If you've tried that, then try installing iTunes as your computer's administrator. To do this right-click the install package and choose "Run as administrator".
    If you're updating iTunes to the most recent version try repairing the Apple Software Update program on your computer. It's under the add/remove programs.
    1. Open the control panel
    2. Open Add/Remove programs (called "Programs and Features" in Windows 7)
    3. Navigate to "Apple Software Update" in the list and click on it
    4. Click on "Change" then select "Repair" (or just select the repair option in Windows 7)
    Once you repair this, try running iTunes and the update again.
    Fingers crossed!

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Managed to get the installation sorted. Go to Control Panel, and where you have a list of all installed programs, repair all the Apple/Itunes related programs. Installation worked fine after that. Hopefully it helps you out too!

  • Has anyone else had problem with the STANDARD package?

    Hi Oracle gurus, has anyone here had the same problem with the STANDARD package? Or do I have to reinstall Oracle to make it work?
    Thanks.
    Ben

    missesboggs wrote:
    I literally just called AT&T and Apple about this today.  I was having issues with iMessage and texting my husband.  His texts back to me would show up as my name.  Turns out it's because we share the same AppleID.  So, I'm currently trying to change mine, but it hasn't worked so far.  I'm on hold with Apple right now to see if I can get it fixed.
    Both of you have registered the same email address for iMessage. If you were using a shared Apple ID and you updated your phones to iOS5, the default will be the Apple ID. Go into settings and change it.

  • HT1926 (iTunes) Problem with Windows installer package?

    (iTunes) Problem with Windows installer package?  I try to install the new version of iTunes but get an error "Problem with Windows installer package.  A Program required for this install could not be run."  Can anyone help shed some light for me as to how to correct this?  I have tried to install the program through Chrome, Explorer and FireFox but have had no success.  I have included a screenshot of the error.  Hopefully it's visable.  Thank you for any help.

    Found answer for anyone else curious.  I love the apple community.  Thanks guys for help!
    https://discussions.apple.com/docs/DOC-3551

  • Trouble with itunes upgrade I receive an error message problem with windows installer package

    I am trying to upgrade itunes.  I am running windows vista 64.  Everytime I try to upgrade I get an error that says Problem with windows installer package.  Anyone know how to fix this?

    No drivers in LowerFilters.
    No drivers in UpperFilters.
    Failed loading CD / DVD drives, error -43. Try doing a repair install on iTunes from the “Add or Remove Programs” control panel.
    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • Why is itunes saying "there is a problem with this installer package. a program required for this install to complete could not be run. contact your support personnel or package vendor."

    why is itunes saying "there is a problem with this installer package. a program required for this install to complete could not be run. contact your support personnel or package vendor."

    Go to START > ALL PROGRAMS > Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you can't find ASU, go to Control Panel:
    XP - Add n Remove Programs
    Win7/Vista - Programs n Features
    Highlight ASU, click change then Repair.

  • Problems with PL/SQL packages

    Hello,
    I face the following problem with PL/SQL stored procedures. The Oracle
    version is 8.0.5 on Windows NT 4. The PL/SQL package has a set of procedures and functions.
    The main procedure of the PL/SQL package is triggered from VC++ executable. If for some reason,
    an exception is caught in the stored procedure (like no_data_found
    exception), then the following problem occurs.
    If we try to trigger the stored procedure again through the VC++ executable,
    the variables in the stored procedures have the values as in the previous
    execution. They are not getting initialised. (The same database connection
    is used in VC++ executable).
    Currently, only if a new connection to the database is used , the problem is
    solved.
    Also, change in the input parameters of the procedure is not reflected, once the procedure fails because of any exception. Only the input which was given during the time of execution when the procedure failed,is considered.
    What could be the reason for this problem and how can this be corrected?
    Please send in your suggestions.
    Thanks and Regards,
    Ramya Priya
    null

    Hi Keith,
    I am connecting to the database as the package owner..
    I have noticed earlier that I have problems when capturing triggers also.. The content of one large trigger contains 36371 characters and when capturing it from DB, the content was truncated to 28020 characters in Designer.
    Our ideas with capturing the DB packages/procedures were to use the Designer as version control system.
    We wanted to have all objects used in a project in Designer.. entities, tables, triggers, packages, procedures, Forms files, etc. in order to make a configuration for a project release.
    Thank you,
    Claudia

  • Can't install itunes due to a problem with windows installer package

    hello there i can't install itunes due to a problem with the windows installer package i found a page on this site (here is the link) http://docs.info.apple.com/article.html?artnum=304405 i done every thing on it and i still haven't been able to fix the problem i have tryed the following unstalling itunes deleteing the registry keys deleteing all the temp files disableing all anit-virus software and anit-spyware. runing cc clearner downloading a new installer for itunes and windows installer and the script thing. and trying to reinstall. nothing seems to work i don't know what else to do this is the error message i get when i try to install i tunes. "there is a problem with this windows installer package.
    A program required for thsi install to complete could not be run.
    Contact your suupport personnel or package vendor."
    Please Help i would be most greatfull for any advise given
    Message was edited by: Joe_TLC

    I pulled my brains out trying to figure this bug out and I may have a solution for you.
    All of it installed fine in my desktop, but a friend's laptop got the error you mentioned on quicktime, itunes, flash, officeXP and about anything else I tried to load for him.
    If you look in: C:\documents and settings\<username>\Local Settings\Temp there will be an iTunes install log...open it in Notepad and see if it isn't exiting with a 1619 error while running msiexec.exe
    If this is the case, this fix should work for you.
    Seems some configurations of XP (and possibly Vista) aren't allowing full administrator rights to the account you set up when you installed XP (even though User Editor says you do have those rights.)
    I read 2 MS articles and turned off simple file sharing, then gave ownership of the entire C: drive to the administrator. Logged the admin account off, logged his "admin" account in, and then gave rights to his personal directory to his account (c:\docs and settings\<username>)
    Once I did that, every install that had previously errored out performed flawlessly.
    The MS articles in question:
    http://support.microsoft.com/?kbid=316309 (1619 error)
    and
    http://support.microsoft.com/?kbid=308419 (how to set special permissions)
    Hope this helps!
    Doc

  • I'm trying to install iTunes 10.3 on my PC (windows vista) and I keep getting this message, "There is a problem with this windows package. A program required for this install to complete could not be run. Contact your support personnel or package vendor."

    I'm trying to install iTunes 10.3 on my PC (windows vista) and I keep getting this message, "There is a problem with this Windows Installer Package. A program required for this install to complete could not be run. Contact your support personnel or package vendor." I accidentally removed the Bonjour service from my system a few weeks ago, but my iTunes continued to work. Now I have no iTunes and I don't know how to fix it. SOMEONE PLEASE HELP!!!!

    a colleague of mine suffers from the same problem. did a quick look on the apple support pages. found many topics covering the same problem.
    also saw 1 marked as correct answer... (just browse the discussion pages before you ask, this answer appearantly was sitting there from oct. 14...)
    (i'm not on windows, so i can't test...)
    good luck!
    j.
    Correct Answer by Peter Lepere  on Oct 14, 2011 3:07 AM
    Hi Rick,
    by "repair" I mean I went to the control panel, option - programs and features, and in the list of all my installed programs I selected "Apple Software Update". On top of the screen you find the options Uinstall, Change and Repair. I clicked the repair button and that did the trick. After the repair I could uninstall the program. I also uninstalled iTunes, Apple Application Support, Apple Mobile Device Support en Bonjour, thus all Apple programs. Then I installed iTunes 10.5 again and everything went fine.
    Success,
    Peter

  • ERROR 1721, problem with windows installer package

    i have windows vista basic on a acer aspire 5535, itunes has always worked on my laptop until apple asked me if i wanted to update so i did (i believe the update was for itunes 9/9.2) after this update i am unable to install itunes and get the error 1721 message saying
    There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support or package vendor.
    i have tried EVERYTHING that i have found on the internet about this, i mean everything and i am ready to give up! does anyone know how to fix this? its so frustrating as i need itunes and i know it once did work on my laptop.
    i've tried command prompts, registry cleaners.. the works.
    please help!?

    Hi,
    I like many others choose to update to itunes 10. Straight after installing the software itunes was not working. :s I was annoyed! So follow a message board followed the instructions. Uninstalled it complete, out of Program files everywhere even downloaded a really good uni-installer program to clean everythin up.
    Now Quick Time 7.6 installs. iTunes 10 gets all the way to the end then you get a error message: "THERE IS A PROBLEM WITH THE WINDOWS INSTALLER PACKAGE. A PROGRAM REQUIRED FOR THIS INSTALL TO COMPLETE COULD NOT BE RUN CONTACT YOUR SUPPORT PERSONNEL OR PACKAGE VENDOR."
    Somebody please help me my life is dull with out the constant flow of new music onto my ipod. :((

  • Trying to install the latest version of iTunes and when it is being installed I get the message "There is a problem with this installer package. A program quired for this install could not be run. Contact your support personel or package vendor."

    I am trying to install the latest version of itunes and when the install begins I get the message "There is a problem with this Windows installer package. A program required for this install could not be opened. contact your support personnel or product vendor". I ran a troubleshooting diagnostic on my computer and nothing flagged as a problem. I uninstalled iTunes and tried again and now I don't have any way to sync my ipod touch. Please help with any suggestions!!!

    Just in case, let's try a standalone AppleSoftwareUpdate.msi install.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe, and select "Extract to iTunesSetup". WinRAR will expand the contents of the file into a folder called "iTunesSetup".
    Go into the folder and doubleclick the AppleSoftwareUpdate.msi to do a standalone ASU install.
    (If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleSoftwareUpdate.msi again.)
    Does it install (or uninstall and then reinstall) properly for you? If not, what error message do you get? (Precise text, please.)

  • "There is a problem with this installer package - script is required to complete install," - please can someone clarify script supplied.

    I have downloaded EMET 4.1 but it will not install -
    "There is a problem with this Windows installer package. A script required for this install to complete. Contact your support personnel or package vendor."
    I have seen the same problem answered in the support section with a script posted as follows, and wondered if it would solve my problem - only  there is no explanation with it and I have no idea what to do with it! Forgive my ignorance but could someone
    please explain what to do with it please? Many thanks.
    (I looked up the other thread but I was no wiser.)
    This thread is probably a dublet of http://social.technet.microsoft.com/Forums/pt-BR/ab0ee94b-ce61-4a62-8478-41a1e8ac39e2/emet-40-installation-fails-with-error-code-1720?forum=emet
    Please create and check a verbose Installer logfile: msiexec.exe /?
    _FA2E7A16_A819_4F3A_AB7E_0A039BE81BD7 refers the Custom Install Action Blob _6A58D16B437E5B268B3B9D09B8746240 which conatins this vb script in EMET 4.1:
    ' Begin
    REM kill the old EMET 3.0 Notifier process if running (upgrade scenario)
    strAppName = "emet_notifier.exe"
    Set objProcesses = GetObject("winmgmts://" & strMachine).ExecQuery("SELECT * FROM Win32_Process WHERE Caption LIKE '" & strAppName & "'")
    For Each objProcess In objProcesses
        intRetVal = objProcess.Terminate(0)
    Next
    REM kill EMET Agent 4.0 process if running (re-installing scenario)
    strAppName = "emet_agent.exe"
    Set objProcesses = GetObject("winmgmts://" & strMachine).ExecQuery("SELECT * FROM Win32_Process WHERE Caption LIKE '" & strAppName & "'")
    For Each objProcess In objProcesses
        intRetVal = objProcess.Terminate(0)
    Next
    ' End

    Managed to get the installation sorted. Go to Control Panel, and where you have a list of all installed programs, repair all the Apple/Itunes related programs. Installation worked fine after that. Hopefully it helps you out too!

Maybe you are looking for