Help for a beginner in utl_file

Hi,
As I said I have just begun to learn pl/sql and looks like I am having a big trouble with it. I will attach the code I started with I know it does not do much and useful but can someone please help me run it? When I try to run it it gives the compilation error invalid directory path...
CREATE OR REPLACE PROCEDURE encrypt_to_file IS
/* Output variables to hold the result of the query: */
a ALL_OBJECTS.OWNER%TYPE;
b ALL_OBJECTS.OBJECT_NAME%TYPE;
vlocation VARCHAR2(16) := 'OUTPUT';
vopen_mode VARCHAR2(16) := 'w';
F1 UTL_FILE.FILE_TYPE;
/* Cursor declaration: */
CURSOR TCursor IS
SELECT OWNER, OBJECT_NAME
FROM ALL_OBJECTS;
BEGIN
OPEN TCursor;
F1 := utl_file.fopen( vlocation, 'DENEME.TXT', vopen_mode );
LOOP
/* Retrieve each row of the result of the above query
into PL/SQL variables: */
FETCH TCursor INTO a, b;
/* If there are no more rows to fetch, exit the loop: */
EXIT WHEN TCursor%NOTFOUND;
END LOOP;
UTL_FILE.FCLOSE(F1);
/* Free cursor used by the query. */
CLOSE TCursor;
END encrypt_to_file;
/

OK, so someone has created a directory object for you.
What do you mean by "I don t get the error with its last condition as procedure"? Are you saying that you no longer get the error when running your procedure?
Are you looking in C:\Temp on the machine where Oracle is running for the file?
In the code you posted, you are not writing anything to the file. Can you add a UTL_FILE.PUT (or PUT_LINE) to ensure that there is something in the file?
Justin

Similar Messages

  • CS3 - Classroom in a Book - Help for real beginner please!

    I'm literally only on lesson 4 of this course so please forgive my ignorance!  Using the Quick Selection Tool the course tells me to "  Choose Edit > Copy and Edit > Paste to paste the selection on a new layer."  I get a message which says "could not complete the Copy command because the selected area is empty".
    I'm sure there is a simple explanation but I just can't find it - please can anyone help this pure beginner from going entirely mad?
    Judy

    Is the layer that you want to copy from the active layer?  In the example below I used the quick selection tool to select some of the image (you can see the "marching ants" in the lower right corner), but since a new empty layer is active and not the layer I want to copy from, the error message you describe is displayed.

  • Help for a beginner

    I AM USING ORACLE DEVELOPER2000 R2.1 (STILL STUDYING IT)AND FIRST I INSTALLED ORACLE 8 PERSONAL EDITION AS A DATABASE ENGINE.
    THE PROPLEM IS THAT I HAD THE PROGRAM READ THE TABLES 'SUMMIT2' FOR THE USER : scott AND THE PASSWORD: tiger. THEN I MAKE IT READ THE TABLES ' SUMMIT2A ' FOR THE USER user1 AND THE PASSWORD : user1.
    THAT WAS USING system, manager. I CAN NOW LOG IN USING SCOTT BUT WHEN I LOG IN USING USER1 IT GIVES ME AN INVALID USER NAME AND PASSWORD.
    I AM USING WIN98. PLEASE HELP...

    you can also invoke any script with a ./<name_of_command>
    for example: ./orainst.sh
    There are also tons of manual pages on how the shell works
    just type: man<name of command you need help with>
    Kevin
    keith barron (guest) wrote:
    : stelar (guest) wrote:
    : : tanks for you help
    : : i have another question.
    : : why i login as root
    : : but cant run oratab.sh?????????????
    : : thanks your frined :stelar
    : : Jim Wartnick (guest) wrote:
    : : : stelar (guest) wrote:
    : : : : hi friends:
    : : : : i download oracle.but cant tar the 805ship.tar,
    : : : : but i cant find the install in orainst directory?
    : : : : why?
    : : : : help me . give me some advice.
    : : : : did i dont full download
    : : : : your friend:stelar
    : : : You should be looking for the file: "orainst" in the
    : : "orainst"
    : : : directory. This file is the executable to install Oracle
    : : 8.0.5.
    : : : It should be there.
    : You should include whatever messages you are getting whenever
    you
    : have a problem (or say there are no messages). My guess is that
    : you are not familiar w/ running a shell script. Are you
    : specifying "orainst.sh". If that doesn't work try (I'm not at
    my
    : linux machine so I'm going on memory) "/usr/bin/sh orainst.sh".
    : If it works, add "/usr/bin" to the path statement in your
    profile
    : (/root/.bash_profile).
    null

  • Help for a Beginner's Program

    Hello, I'm fairly new to the Java language. Recently I was writing a program revolving around the creation of classes and constructors...my code looks like this:
    import java.util.Scanner;
    class Money{
         private static int dollars, cents;
         Money(int dollars, int cents){
         Money(int dollars){
         Money(){
         static Money add(Money n,Money n2){
              return (n + n2);
         static Money minus(Money n,Money n2){
              return (n + n2);
         public static boolean equals(int m, int m2){
              if((m == dollars) && (m2 == cents));
                   return true;
         public String toString(){
              return ("Dollars = "+ getDollars() + " " + "Cents =" + getCents());
         public static int getDollars(){
              return (dollars);
         public static int getCents(){
              return (cents);
         public static void setDollars(int n){
              dollars = n;
         public static void setCents(int n2){
              cents = n2;
    class Program2_5{
         public static void main (String [] a) {
              Scanner kb= new Scanner (System.in);
              System.out.println ("Enter the amount of dollars");
              int d=kb.nextInt();
              System.out.println ("Enter the amount of cents");
              int c=kb.nextInt();
              Money.setDollars(d);
              Money.setCents(c);
              System.out.println (Money.toString());
    The main part of my code is just to simply make sure the methods actually work. When i go to compile my code I get three errors revolving around three specific lines.
    Error 1= {Operator + cannot be applied to Money, Money}
    *static Money add(Money n,Money n2){*+
    *     return (n n2);*+
    Error 2= {Same as Error 1}
    *static Money minus(Money n,Money n2){*+
    *     return (n n2);*+
    Error 3={non-static method toString() cannot be referenced from a static context}
    *public String toString(){*+
    *     return ("Dollars = " getDollars() + " " + "Cents =" + getCents());*+
    In order to fix Error 3 i tried to place static in front of String toString() but got an error about the Money String toString() cannot override the Object StringtoString()
    I have been working with this program for hours on and off and would really appreciate it if someone with more experience could help me...Thank You

    I think there are a few things that could help you out. Firstly, amounts are generally not looked at as dollars and cents separately. You can always go back and change it, but I'd code it a bit more like this:
    import java.util.Scanner;
    public class Money {
      private double amount;
      public Money() {
        this(0.0);
      public Money(double amount) {
        setAmount(amount);
      public void setAmount(double amount) {
        this.amount = amount;
      public double getAmount() {
        return(amount);
      public void add(double amount) {
        setAmount(getAmount()+amount);
      public void minus(double amount) {
        setAmount(getAmount()-amount);
      public boolean equals(double amount) {
        if (getAmount() == amount)
          return true;
        return false;
      public String toString() {
        return ("Amount = "+getAmount());
      public static void main (String [] argv) {
        Scanner kb= new Scanner (System.in);
        System.out.println("Enter initial amount");
        double a=kb.nextDouble();
        Money money = new Money(a);
        System.out.println(money.toString());
        System.out.println("Enter amount to add");
        a=kb.nextDouble();
        money.add(a);
        System.out.println(money.toString());
        System.out.println("Enter amount to subtract");
        a=kb.nextDouble();
        money.minus(a);
        System.out.println(money.toString());
        System.out.println("Enter amount to compare");
        a=kb.nextDouble();
        System.out.println(money.equals(a));
    }Hope it helps you out.

  • Code bug help for a beginner!!

    Ok, I've written this code so far. Everything was fine until I got to the IF condition. When I try compiling it it tells me that the 'a' variable in the IF condition expression may not have been initialised, which I don't really understand as it's been declared at the start of the program and even used fine beforehand in the switch statements.
    Any ideas?
    Thanks for any help. Here's the code.
    import javax.swing.JOptionPane;
    public class LetterProgram {
    public static void main (String args[]) {
       String pickALet;
       String output;
       char letter;
       int guess;
       int a;
       pickALet = JOptionPane.showInputDialog ("please enter a lower case letter from (a to e)");
       output = "you selected a letter " + pickALet;
       letter = pickALet.charAt(0);
       switch (letter) {
       case 'a':
       a = 1;
       output = "you entered an a";
       break;
       case 'b':
       a = 2;
       output = "you entered a b";
       break;
       case 'c':
       a = 3;
       output = "you entered a c";
       break;
       case 'd':
       a = 4;
       output = "you entered a d";
       break;
       case 'e':
       a = 5;
       output = "you entered an e";
       break;
       default:
       output = "i did not recognise your entry";
       break;
       JOptionPane.showMessageDialog(null, output, "your letter", JOptionPane.INFORMATION_MESSAGE);
       guess =(int)(Math.random()*5 +1 ) ;
       System.out.println(guess);
       if (guess==a)
          System.out.println("The computer guessed the correct letter");
       else
          System.out.println("The computer guessed the letter incorrectly");
       System.exit(0);

    It's better to add a default label to the switch; otherwise for most cases you will be setting the value twice, and it makes the intent of 'none of the above' clearer.
    Pete

  • Report Painter Help for a Beginner

    Hi All
    I am very new to FI and even SAP - can any one help with the tips for creating a report through Report Painter- I have gone through the online helps but not able to pick up, please help to create a simple G/L Report or some other reports for learning purpose
    Advance thanks for the help
    Thanks again
    Srini

    Hi all
    Please note I have a problem, my client want to create a same cost centers for all company codes (8 company codes) in one controlling area (all company codes linked with one controlling area), but the cost center master data is not accepting the same cost center for the different company code in the same controlling area- client don't want to create a new  cost centers since they are using the same cost centers for years in Peoplesoft, how to tackle this problem- anyway we can suppress the company code in the cost center master data?- &  if we supperss also the final report will be Ok?- Pls help
    Thanks
    Srini

  • Help for a beginner creating a 2d image-processing suite in LabVIEW.

    I am a final year student and currently seeking any advice from experienced engineers with regard to my project.
    The project is to create a LabVIEW based image-processing suite, which would be able to import 2d arrays of data from microscope, plus other information (scaling, date/time, sample info) and perform the following functions:
    Visualisation – 2d & 3d, Cross-section Profile Analysis, Histogram, Fourier Transform, Auto-Correlation, Copy, Print, Save & Export, Colour Palette Edit, Zoom, Manipulate.
    Having not used LabView previously, any examples or information you may have would be of extreme use,
    Thank you in advance for any help you can give me,

    Sam,
    Most of these tools are readily available in LabVIEW when you purchase the IMAQ Vision toolkit. You just need to learn how to use them and set them up. In your case, I would strongly recommend starting with Vision Builder. You can learn how to use a number of these tools, and it may actually be sufficient for your project without writing any code. It can generate LabVIEW code as well, so it would get you started on your program.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Help for a beginner please -using iTunes

    Using iTunes for the first time, I buy and download an item. It`s a piece of music that lasts 55 mins.OK.The stuff comes down the line, and I can make it play on my scratchy screen-speakers.
    I then try to copy it to a DVD with my DVD writer. I`m warned it may take up to an hour. No indication of progress is given. After a few minutes there`s a xylophone-bong. Maybe it means the process failed. Maybe succeeded. I don`t know. No indication of either.The disc won`t play so I suppose I failed.
    A make a second try, on to a CD. This time no Burn - button appears on the screen, so I`m stuck straight away. Is Apple stopping me making a second copy, so I have to spend another ten quid downloading the thing again ? A pretty severe penalty for a mistake !
    Can anyone put me right, and maybe direct me to an elementary tutorial ?
    Eigenblog
    HP T3640 desktop   Windows XP  

    Making a DVD only creates a backup copy of a track. It does not create a disk that can be played in any other player. If you want to create a disk that can be played in other players, you need to burn an audio CD, so check your iTunes -> Advanced -> Burning preference and make sure it's set to Audio CD. Then you need to put the track into a playlist. It can be the only track in the playlist, but it must be in a playlist before it will burn.
    For more information, this tutorial may help:
    iTunes: Burn Your Music To CD
    Hope this helps.

  • A help for a beginner

    i just downloaded JMF on a windowxp OS ( i also downloaded java2sdkl1.4.2_02 ).
    I added the lib and bin directories to the PATH in the systems environment variables and i checked that the jmf.jar and sound.jar are created in the CLASSPATH user environment variables.
    My first question : should i add anything else to my environment variables ?
    i am trying to make an rtp session between two pcs and transmit audio files between the two terminals.
    i followed many methods and all of them failed, but i don't know the reason behind the failure .
    first, i opened an rtp session on the receiver side with the ip address of the transmitter and the port and was waiting for data.
    on the transmitter side , i have chosen an audio file to transmit by the transmit option at the ip address of the receiver and the same port .
    the result was :
    when i tried to transmit an mp3 file, the receiver side have this error :
    Controller error:
    Internal Module com.sun.BasicRendereModule@16aa42e: failed to handle a data format change.
    when i tried to transmit a midi file, the transmitter side have this error :
    Failed to create processor.
    Exception.
    Cannot find a processor for : com.sun.media.protocol.file
    DataSource@57e787
    second method, i transmit the audio file by the transmit option.
    on the receiver side, i opened the URL address : rtp:// 192.168.10.10/40000/audio/1/4
    192.168.10.10 is the ip address of the transmitter side
    40000 the port number same at both sides.
    audio 1 is the number of the track.
    4 is the value of ttl.
    the result is that the receiver opened a player but did not hear anything.
    i also tried the methods described at JMFsolutions : AVReceive2/3, AVTransmit2/3 aslo they failed.
    Last thing, when i try to add a plugin for the codec or renderer or anything else on the registry editor, i receiver the following error:
    Could not add item.
    Hope someone will help me to solve the problems.

    Any one found out the answer ? I get the same damn error ...
    RTP Handler internal error: javax.media.ControllerErrorEvent[s
    a.content.unknown.Handler@19616c7,message=Internal module com.
    dererModule@f0eed6: failed to handle a data format change!]
    thanks in advance for helping me out ...

  • Help for absolute beginner

    I am very new to computing and wish to learn more. Would like to learn Java and have access to net. Could download from site , but would then need my hand held for installation. If anybody is prepared to get me started please reply. I will not be offended by any answers (especially helpful ones!) Regards Steve

    I am very new to computing and wish to learn more.
    Would like to learn Java and have access to net. Could
    download from site , but would then need my hand held
    for installation. If anybody is prepared to get me
    started please reply. I will not be offended by any
    answers (especially helpful ones!) Regards SteveThis is latest on Sun site. might be helpful
    http://developer.java.sun.com/developer/onlineTraining/new2java/divelog/?frontpage-banner
    cheers!!

  • Printing from ipad - help for a beginner please

    I have downloaded the "Print to All.." app into my ipad 1.  I have an HP Photosmart Premium wireless printer. How do I print an e-mail?

    Have you consulted the Help pages?
    http://mobile.eurosmartz.com/help/help_index.html (assuming that's the correct app).
    However, if it is the correct app, the second line of the description in the AppStore says:
    "if you want to print email, docs, web pages or calendar etc, look at our other app "Print n Share""

  • Some array based help for a beginner needed.

    Hello there.
    I have an array, initialised like..
    int numbers[] = {12, 15, 67, 18, 29, 40, 23, 4, 59, 5 } ;
    and wish to print out a line, which has the sum of these numbers, and the average of them.
    any help will be greatly appreciated.
    Thanks

    So what's the problem?
    How would you do it manually? Write that down in very simple, precise, small steps. Then translate those steps into Java code. Post your best effort and specific questions when you get stuck.

  • How to make a really basic pong game for a beginner

    Hello.  I've read through a couple of threads on here dealing with making a game of pong in LabView, but in them the users had questions with far more complex aspects of the program than I want to deal with.  I am a beginner programmer in LabView with limited experience in Java and Visual Basic programming.  I was tasked with creating a game over winter break, and now that I finally have some time (this weekend that is), I decided that I'd make a really simple game of pong.  However, I have seriously overestimated the difficulty of this for a beginner who has very limited knowledge of Lab View.
    I ask you to please have some patience with me.
    I know what I want to do, and just need help inplementing it.
    Here is the idea for my design to keep it as simple as possible:
    -Create a field (I am not sure what to use for this, but from my reading it appears that some sort of a picture output is needed, but I cannot find that anywhere).
    -Set up some simple function that can output the dimensions of this field to use with collision tracking.
    -Create a ball that can be tracked by the program.
    -From my reading I understand that the simplest way to "bounce" the ball off the sides appears to simply reverse the X velocity of the ball when it strikes the vertical boundaries and the Y velocity when it strikes the horizontal boundaries.
    -Insert some sort of a "paddle" that the user can control with the left and right arrow keys.
    Now, as I have mentioned I am a beginner with approximately one month maximum knowledge of this software, spread over about a year.  I want to take things slow.  So for starters, would anyone be willing to walk me through creating a visual output for this and creating a ball that will bounce off all sides?
    If I can at least get that far for now, then I can move on (with help I hope!) of inserting an interactive interface for the "paddle."
    I have found some LabView code for a simple game like this, but it also includes a score keeping loop as well as an "automatic play" option, and I am attempting to wade through all that code to find the bones of it to help me with this, but due to my inexperience, this might thake a lot of time.
    I thank you for any and all help anyone may be able to provide.

    EchoWolf wrote:
    -Create a field (I am not sure what to use for this, but from my reading it appears that some sort of a picture output is needed, but I cannot find that anywhere).
     Wel, there is the picture indicator in the picture palette. In newer versions it's called "2D picture". The palettes have a search function. Using the palette search function is a basic LabVIEW skill that you should know. If you've seen the example for the other discussion, it uses a 2D boolean array indicator. The boolean array is only recommended for a monochrome very low resolution display.
    EchoWolf wrote: -Set up some simple function that can output the dimensions of this field to use with collision tracking.
    -Create a ball that can be tracked by the program.
    That seems backwards. Properly programmed, the code always knows the dimension and the ball position. The program generates, (not tracks!) the ball movement. Of course you need to do some range checking on the ball position to see when it collides with the walls.
    EchoWolf wrote:
    -From my reading I understand that the simplest way to "bounce" the ball off the sides appears to simply reverse the X velocity of the ball when it strikes the vertical boundaries and the Y velocity when it strikes the horizontal boundaries.
    Of course you could make it more realistic by keeping track of three ball parameters: x, y, spin.
    EchoWolf wrote:
    -Insert some sort of a "paddle" that the user can control with the left and right arrow keys.
    Pong is typically played with the up-down arrow keys.
    EchoWolf wrote:
    Now, as I have mentioned I am a beginner with approximately one month maximum knowledge of this software, spread over about a year.
    LabVIEW knowledge is not measured in time units. What did you do during that month? Did you attend some lectures, study tutorials, wrote some programs?
    EchoWolf wrote:
    So for starters, would anyone be willing to walk me through creating a visual output for this and creating a ball that will bounce off all sides?
    I have found some LabView code for a simple game like this, but it also includes a score keeping loop as well as an "automatic play" option, and I am attempting to wade through all that code to find the bones of it to help me with this, but due to my inexperience, this might thake a lot of time.
    Start with the posted example and delete all the controls and indicators that you don't want, then surgically remove all code with broken wires.
    Alternatively, start from scratch: Create your playing field. Easiest would be a 2D classic boolean array that is all false. Use initialize array to make it once. Now use a loop to show the ball as a function of time.
    Start with a random ball position. to display it, turn one of the array elements true before wiring to the array indicator using replace array subset.
    Keep a shift register with xy positions and xy velocities and update the positions as a function of the velocities with each iteration of the loop. Do range checking and reverse the velocieis when a edge is encountered.
    What LabVIEW version do you have?
    LabVIEW Champion . Do more with less code and in less time .

  • So iWeb is dead? what is the next best thing for a beginner?

    Hi Guys,
    I have my new Mac and i want to build my first website....with iWeb dead, what is the next best web builder for a beginner like me...? I want to creat a blog add the odd photo and link to my twitter page. Thats about it.....any suggestions?
    Many thanks
    Ian

    Are you saying that you have an iWeb blog hosted on a 3rd party ftp server which allows visitors to add comments? That would be a first since the following has always been part of iWeb's Help file:
    Features Unavailable When Publishing to a 3rd Party Server:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    The following is a screenshot of  iWeb Help on publishing to an ftp server:
    Currently if the site is published directly from iWeb to the 3rd party server the RSS feed and slideshow subscription features will work. However, if the site is first published to a folder on the hard drive and then uploaded to the sever with a 3rd party FTP client those two feature will be broken.
    OT

  • Need Help for AIR Email Application

    Hi,
    I’m a beginner to Adobe AIR.
    My new assignment is to create an AIR Application which works like MS Outlook with minimal features like compose mail, inbox, send items and contact details.
    With the help of some server side script (like PHP, CF) I can make it work. But My TL asked me to communicate directly with mail server through AIR.
    I googled for a week for some tutorial to help me, But I can’t find anything useful.
    Is there any way to communicate directly with web server and list the Inbox, Outbox, and Contact details…? If so, please help me to find the solution…
    Thanks In Advance

    Hi,
    You can use LaunchExecutableEx to determine the window state:
    LaunchExecutableEx ("command.com /C calc.exe", LE_HIDE, NULL);
    Beware that this function does not wait for the started executable to exit.
    It executes the command in the string and continues.
    If your application has to get the results of the call, then you need to get the application handle  (3rd parameter, put a variable instead of the NULL above) and call ExecutableHasTerminated in a loop to find out if the execution finished.
    Read carefully the help for the LaunchExecutableEx function and Handle parameter.
    To get the result of the command line call, you can add a "> output.txt" parameter to the end of your command line call.
    This way all the text output of the command is written to the output.txt file, from which you can read the result.
    Check the command-line email sender program's help if there is a special paramter to make it more "verbose".
    Hope this helps, 
    S. Eren BALCI
    www.aselsan.com.tr

Maybe you are looking for

  • System I/O Operation Time-out

    I am running iTunes 6.0.5 for Windows. When I try to sync to load about 200 songs on my iPod nano (1st generation)I get the error "The specified I/O operation on drive G: was not completed before the time-out period expired." If I am lucky I might ge

  • Need FM/BAPI for asset acquisitions, disposals and balances...

    Hello Experts, I need to create a report wherein it shows the asset acquisitions(S_ALR_87012050), disposals/retirements(S_ALR_87012052) and balances(S_ALR_87011964). Anybody has done this requirement? Please let me know what are the tables and BAPIS

  • How Badly Do You Abuse Reserved Words in Column Names

    I have a challenge for all you DBA's out there.  Most of us agree that reserved words as column names is a bad practice but how clean is your database and some people are quit outspoken about it.  Run the following query on some of your custom, non-C

  • Introducin​g the lamination layer to protect your diagram from damage!

    It's sort of half serious... But, as an extension to what I think is a (very) clever use of the Sequence Structure as diagram carpet aiming at hiding all those distracting pass-through wires, I am proud to introduce the transparent label as a  "lamin

  • HOW to load Master data

    Can I not load Master data, that is Text directly to infoObject. Now I load Text to a custom infoObject from a flat file. Infopack puts data in PSA, Then dont I need a DTP to put data into infoObject. Now when I try to create DTP it will say it will