Procedure error with UTL File

Hi guys, I have got this following error within a procedure which includes the UTL File
I think its to do with the syntax or could be missing an end if somewhere? Im not too sure.
Here it is:
create or replace
PROCEDURE PJW_PRC
IS
-- VARIABLE
v_out_file UTL_FILE.FILE_TYPE;
-- VARIABLE
v_row_Count NUMBER;
rec_users varchar;
BEGIN
---r_dca variable
FOR r_dca IN
( SELECT *
FROM dcaadditionaldata
WHERE directory_name IS NOT NULL
) LOOP
-- Confirm there are actually rows to export
SELECT COUNT
INTO v_row_count
FROM ACCOUNTDETAILS
JOIN CUSTOMERDETAILS
ON ACCOUNTDETAILS.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
WHERE EXISTS
--Dependent if rows were found or not, below checks to see if rows are found.
( SELECT *
FROM DCAACCOUNTALLOCATION
JOIN DEBTEPISODES ON DEBTEPISODES.ACCOUNTID = DCAACCOUNTALLOCATION.ACCOUNTID
WHERE DCAACCOUNTALLOCATION.dcaid = r_dca.dcaid
AND DCAACCOUNTALLOCATION.status = 3
AND DEBTEPISODES.HANDOVERDATE IS NULL
AND DCAACCOUNTALLOCATION.ACCOUNTID = ACCOUNTDETAILS.ACCOUNTNUMBER
AND DEBTEPISODES.DCAORLAWYER = 'DCA'
-- Checks to see if any rows are available to export, in this case, if there are no rows (0) returned, then.
IF v_row_count = 0 THEN
-- No rows to export so do nothing
NULL;
-- Anything Else, then
ELSE
BEGIN
-- Output file
v_out_file := utl_file.fopen (r_dca.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
-- Header
utl_file.PUT_LINE(v_out_file,'TASK3');
-- REC_USERS = the variable
FOR rec_users IN
( SELECT
ACCOUNTDETAILS.CUSTOMERNUMBER,
ACCOUNTDETAILS.ACCOUNTNUMBER,
CUSTOMERDETAILS.CDTITLE,
CUSTOMERDETAILS.CDFIRSTNAME,
CUSTOMERDETAILS.CDLASTNAME,
ACCOUNTDETAILS.ACCOUNTTYPE,
ACCOUNTDETAILS.ORIGINALCONTRACTENDDATE,
ACCOUNTDETAILS.CONTRACTTERM,
ACCOUNTDETAILS.CONTRACTENDDATE,
ACCOUNTDETAILS.BRANCHAREA,
ACCOUNTDETAILS.PRODUCTTYPE,
ACCOUNTDETAILS.HOUSEBANKACCOUNT,
ACCOUNTDETAILS.CARMODEL,
ACCOUNTDETAILS.CARLICENCE,
ACCOUNTDETAILS.ARREARSBALANCE,
ACCOUNTDETAILS.CODEBTOR,
ACCOUNTDETAILS.GUARANTORnumber
FROM ACCOUNTDETAILS
JOIN CUSTOMERDETAILS ON ACCOUNTDETAILS.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
WHERE EXISTS
( SELECT *
FROM DCAACCOUNTALLOCATION
JOIN DEBTEPISODES ON DEBTEPISODES.ACCOUNTID = DCAACCOUNTALLOCATION.ACCOUNTID
WHERE DCAACCOUNTALLOCATION.dcaid = r_dca.dcaid
AND DCAACCOUNTALLOCATION.status = 3
AND DEBTEPISODES.HANDOVERDATE IS NULL
AND DCAACCOUNTALLOCATION.ACCOUNTID = ACCOUNTDETAILS.ACCOUNTNUMBER
AND DEBTEPISODES.DCAORLAWYER = 'DCA'
LOOP
--same as trigger, rec_users is the variable
UTL_FILE.PUT_LINE (v_out_file,
rec_users.CUSTOMERNUMBER|| ',' || rec_users.ACCOUNTNUMBER|| ',' ||rec_users.CDTITLE|| ',' ||rec_users.CDFIRSTNAME || ',' ||
rec_users.CDLASTNAME|| ',' || rec_users.ACCOUNTTYPE|| ',' ||rec_users.ORIGINALCONTRACTENDDATE|| ',' ||rec_users.CONTRACTTERM || ',' ||
rec_users.CONTRACTENDDATE|| ',' || rec_users.BRANCHAREA|| ',' ||rec_users.PRODUCTTYPE|| ',' ||
rec_users.HOUSEBANKACCOUNT|| ',' || rec_users.CARMODEL|| ',' ||rec_users.CARLICENCE|| ',' ||
rec_users.ARREARSBALANCE|| ',' || rec_users.CODEBTOR|| ',' ||rec_users.GUARANTORnumber);
END LOOP;
--Close the file below
UTL_FILE.fclose (v_out_file);
EXCEPTION
WHEN OTHERS THEN
-- IF an error occurs while writing the file then we want to
-- close the open file
IF utl_file.is_open(v_out_file)
THEN
UTL_FILE.fclose (v_out_file)                    *-- ERROR OCCURS HERE **
END IF;
END;
-- We have successfully written a file so set handover date to current date
-- for all relevant debtepisodes
UPDATE DEBTEPISODES
SET handoverdate = TRUNC(SYSDATE)
WHERE DCAORLAWYER = 'DCA'
AND handoverdate IS NULL
AND accountid IN
( SELECT accountid
FROM DCAACCOUNTALLOCATION
WHERE DCAACCOUNTALLOCATION.status = 3
AND DCAACCOUNTALLOCATION.dcaid = r_dca.dcaid
END IF;
END LOOP;
COMMIT;
END PJW_PRC;
The tables and columns stated are what I am currently using and what needs to be used.
The error is shown in bold above producing this:
Error(101,11): PLS-00103: Encountered the symbol "END" when expecting one of the following: := . ( % ; The symbol ";" was substituted for "END" to continue.
Any help would be appreciated, many thanks
Ram

Ram wrote:
Hmm doesnt seem to work
another small error :(And that is? Try and compile your code in SQL*Plus and COPY/PASTE that and Oracle's response here. Use \ tags please :)                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Error using UTL File

    Hi,
    I am using UTL file to export data to an external file and getting an error which i am unable to reslove... Can anyone help me with this
    SQL> create or replace
    2 procedure MEXICO_NAFTA_CERTIFICATE_EXT (
    3 f_org_id varchar2,
    4 f_customer_nbr_base varchar2,
    5 f_customer_nbr_sufx varchar2,
    6 f_year VARCHAR2)
    7 is
    8 output_file utl_file.file_type;
    9 o_filename VARCHAR2(50):= 'MEXICO_NAFTA_CERTIFICATE_EXT.txt';
    10 o_DataDir CONSTANT VARCHAR2 (30) := '/d014/oradata/temp';
    11 v_CERTIFICATE_NBR fta.SAP_CERTIFICATES_EXTRACT_VIEW.CERTIFICATE_NBR%type;
    12 v_PART171 fta.SAP_CERTIFICATES_EXTRACT_VIEW.PART171%type;
    13 v_INACTIVE_IND fta.SAP_CERTIFICATES_EXTRACT_VIEW.INACTIVE_IND%type;
    14 v_HTS_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.HTS_CDE%type;
    15 v_ORIGINATING_IND fta.SAP_CERTIFICATES_EXTRACT_VIEW.ORIGINATING_IND%type;
    16 v_ISO_COUNTRY_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.ISO_COUNTRY_CDE%type;
    17 v_BASIS_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.BASIS_CDE%type;
    18 v_PRODUCER_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.PRODUCER_CDE%type;
    19 v_CERT_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.CERT_CDE%type;
    20 v_REGIONAL_VALUE_CONTENT_CDE fta.SAP_CERTIFICATES_EXTRACT_VIEW.REGIONAL_VALUE_CONTENT_CDE%type;
    21 v_PART_NBR fta.SAP_CERTIFICATES_EXTRACT_VIEW.PART_NBR%type;
    22 v_EFFECTIVE_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.EFFECTIVE_DATE%type;
    23 v_EFFECTIVE_FROM_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.EFFECTIVE_FROM_DATE%type;
    24 v_EFFECTIVE_TO_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.EFFECTIVE_TO_DATE%type;
    25 v_TRANSACTION_DATE fta.SAP_CERTIFICATES_EXTRACT_VIEW.TRANSACTION_DATE%type;
    26
    27
    28 CURSOR Cert_ext IS select certificate_nbr ,
    29 part171,
    30 inactive_ind,
    31 hts_cde,
    32 originating_ind,
    33 iso_country_cde,
    34 basis_cde,
    35 producer_cde,
    36 cert_cde,
    37 regional_value_content_cde,
    38 part_nbr,
    39 effective_date,
    40 effective_from_date,
    41 effective_to_date,
    42 transaction_date
    43 from fta.SAP_CERTIFICATES_EXTRACT_VIEW
    44 where org_id= f_org_id AND
    45 customer_nbr_base= f_customer_nbr_base AND
    46 customer_nbr_sufx = f_customer_nbr_sufx AND
    47 to_char(effective_from_date, 'yy') = f_year AND
    48 to_char(effective_to_date, 'yy') = f_year;
    49
    50 begin
    51
    52 output_File := UTL_FILE.FOPEN (o_DataDir, o_FileName, 'w');
    53
    54 OPEN Cert_ext;
    55 loop
    56
    57 fetch Cert_ext into v_CERTIFICATE_NBR ,
    58 v_PART171 ,
    59 v_INACTIVE_IND,
    60 v_HTS_CDE ,
    61 v_ORIGINATING_IND ,
    62 v_ISO_COUNTRY_CDE ,
    63 v_BASIS_CDE ,
    64 v_PRODUCER_CDE ,
    65 v_CERT_CDE ,
    66 v_REGIONAL_VALUE_CONTENT_CDE ,
    67 v_PART_NBR,
    68 v_effective_date,
    69 v_effective_from_date,
    70 v_effective_to_date,
    71 v_transaction_date ;
    72
    73 UTL_FILE.PUT_LINE (output_File, v_CERTIFICATE_NBR || ' '||
    74 v_PART171 || ' '||
    75 v_INACTIVE_IND || ' '||
    76 v_HTS_CDE || ' '||
    77 v_ORIGINATING_IND || ' '||
    78 v_ISO_COUNTRY_CDE || ' '||
    79 v_BASIS_CDE || ' '||
    80 v_PRODUCER_CDE || ' '||
    81 v_CERT_CDE || ' '||
    82 v_REGIONAL_VALUE_CONTENT_CDE || ' '||
    83 v_PART_NBR || ' '||
    84 to_char(v_EFFECTIVE_DATE, 'mm-dd-yy') || ' '||
    85 to_char(v_EFFECTIVE_FROM_DATE, 'mm-dd-yy') || ' '||
    86 to_char(v_EFFECTIVE_TO_DATE, 'mm-dd-yy') || ' '||
    87 to_char(v_TRANSACTION_DATE, 'mm-dd-yy'));
    88
    89 UTL_FILE.FCLOSE (output_File);
    90 DBMS_OUTPUT.PUT_LINE ('Data Extracted');
    91 end loop;
    92 close Cert_ext;
    93 END MEXICO_NAFTA_CERTIFICATE_EXT;
    94 /
    Procedure created.
    SQL> declare
    2 begin
    3 MEXICO_NAFTA_CERTIFICATE_EXT('0048', '00254101', '11', '03');
    4 end;
    5 /
    Data Extracted
    declare
    ERROR at line 1:
    ORA-29282: invalid file ID
    ORA-06512: at "SYS.UTL_FILE", line 774
    ORA-06512: at "FTA_SOURCE.MEXICO_NAFTA_CERTIFICATE_EXT", line 72
    ORA-06512: at line 3

    what is the datatype of your column org_id for the table fta.SAP_CERTIFICATES_EXTRACT_VIEW? also try to put this exceptions to see what might be the exact cause of the error.
      EXCEPTION
        WHEN utl_file.invalid_mode THEN
          RAISE_APPLICATION_ERROR (-20051, 'Invalid Mode Parameter');
        WHEN utl_file.invalid_path THEN
          RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
        WHEN utl_file.invalid_filehandle THEN
          RAISE_APPLICATION_ERROR (-20053, 'Invalid Filehandle');
        WHEN utl_file.invalid_operation THEN
          RAISE_APPLICATION_ERROR (-20054, 'Invalid Operation');
        WHEN utl_file.read_error THEN
          RAISE_APPLICATION_ERROR (-20055, 'Read Error');
        WHEN utl_file.internal_error THEN
          RAISE_APPLICATION_ERROR (-20057, 'Internal Error');
        WHEN utl_file.charsetmismatch THEN
          RAISE_APPLICATION_ERROR (-20058, 'Opened With FOPEN_NCHAR But Later I/O Inconsistent');
        WHEN utl_file.file_open THEN
          RAISE_APPLICATION_ERROR (-20059, 'File Already Opened');
        WHEN utl_file.invalid_maxlinesize THEN
          RAISE_APPLICATION_ERROR(-20060,'Line Size Exceeds 32K');
        WHEN utl_file.invalid_filename THEN
          RAISE_APPLICATION_ERROR (-20061, 'Invalid File Name');
        WHEN utl_file.access_denied THEN
          RAISE_APPLICATION_ERROR (-20062, 'File Access Denied By');
        WHEN utl_file.invalid_offset THEN
          RAISE_APPLICATION_ERROR (-20063,'FSEEK Param Less Than 0');
        WHEN others THEN
          RAISE_APPLICATION_ERROR (-20099, 'Unknown UTL_FILE Error');

  • Problem with utl file

    Hi to all,
    I have tried the UTL file concept as per the oracle documentation
    I have created a directory name read_flat_file and granted read, write permission to the whm user. I am trying to executing the below code as in Oracle Documentation, but I am getting this below error.
    DECLARE
    V1 VARCHAR2(32767);
    F1 UTL_FILE.FILE_TYPE;
    BEGIN
    F1 := UTL_FILE.FOPEN('READ_FLAT_FILE','HMI PO','R',256);
    UTL_FILE.GET_LINE(F1,V1,32767);
    UTL_FILE.FCLOSE(F1);
    END;
    Error I am getting is
    F1 UTL_FILE.FILE_TYPE;
    ERROR at line 3:
    ORA-06550: line 3, column 4:
    PLS-00201: identifier 'UTL_FILE' must be declared
    ORA-06550: line 3, column 4:
    PL/SQL: Item ignored
    ORA-06550: line 5, column 1:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 5, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 6, column 19:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 6, column 1:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 17:
    PLS-00320: the declaration of the type of this expression is incomplete or
    malformed
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored
    I tried this code from system user but I got the same error.
    When I am trying the same code with the SYS User I got this error.
    declare
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 475
    ORA-29283: invalid file operation
    ORA-06512: at line 5
    I dont understand the UTL_FILE package is granted to PUBLIC role by default.
    In sys user the handler is throwing the error perfectly that invalid file operation. then why this is not occuring with other users.
    Please let me know why this is happening
    Thanks and Regards,
    Vijay

    Hi Vijay,
    There are two problems here...
    The first is that your user doesn't appear to have execute privs on the procedure. As you say, it is usually granted to public, but it doesn't look like it is for you. Check the privileges with:
    select *
    from dba_tab_privs
    where table_name like 'UTL_FILE'
    This will list who has permissions on the package. If you get nothing, grant execute to either public or to your user:
    grant execute on sys.utl_file to <user/public>;
    The second problem is a syntax error on line 5 of your procedure. Remove the ',256' bit - it shouldn't be there.
    F1 := UTL_FILE.FOPEN('READ_FLAT_FILE','HMI PO','R');
    Cheers,
    Andy Barry
    http://www.shutdownabort.com

  • InDesign CC | Error with indd file - "Cannot open the file...Adobe InDesign may not support file format"

    I encountered a very strange error with InDesign CC after saving a file created in CS4. I'd attach the file but I'm not sure how to do this, if I'm able to. The file is 44kb and doesn't seem like it should be (file I saved had a large book cover). Now since the original CS4 file was overwritten using InDesign CC, the file is corrupt and I'm getting the error message displayed below. The file is not open within another application. Has anyone gotten this before?

    Thanks for your response Peter. Below is the gibber contained in the first four lines. In the first line, where it reads "mimetypeapplication" and then "indesign-idml-package", I would assume that this should've been a valid idml file.
    PK        *meEËv‰+   +       mimetypeapplication/vnd.adobe.indesign-idml-packagePK        *meE!t/k   {<     designmap.xmlÝ[ýrÚH ÿ;y •ê.µ[uk 6¶IÀ)À áb  þÈÞÖÖÖ 0e1£ IŽÙ¿ò wUw/—'¹îÑ× cc;gv«²FÝ==¿îéîé CýýíÌ5n¨ô™à ³¼U2 Êmá0>i˜ çÇ?훆  î WpÚ0çÔ7ß ¼®¿'Ì ÆÜ Z   s >9 g” ¦!)q¨¼L ï¢â1%A(é ³RÝ3 O '´á©\Ú*ý°WúÑ4P÷a¬Å lÜËœþ5€™ ÷Ö²¸¿E 1¢[¶˜YMüÔá‡Ôg n1gæZ`‚å ûšLÀ Ó8ìuS 8‹i ©; ¤ð! r~Ê|˜?¤ # ׌°\ÂÿöwŒ°62R)ú‚q( 0´i 솞’9•0f´k íîÏ ûRŒ úábk¸e\Ñ‘Ñ $ ŽñÃðª×ÿѸ©˜ÆकŠùð`tŽÚ»åÚîîO•2@ .sÚ ²Ã Šó]øT=ƒ³ 0ćÉÇ •-—r\›b±C:&¡ tfdB‹¥  ÌiÏ f_RŸÊ z4 QÇ¡NŒÓ‹¥Úb6bœ àÈÞ8 ÒäΐŒi{6¿FçØ¡ »O›¡' ¿aŽ‰ëSóàõ«ú)á“  ÅÎO ¿t #>q™?

  • Error with a File Sender interface

    Hi gentz,
    we have an error with an interface which we can't explain. We are using a File Sender Adapter with File Transfer Protocol.
    We are receiving the following eror:
    <i><b>Could not process file '0080953854-071201.csv': com.sap.aii.adapter.file.ftp.FTPEx: 550 SAPUIT: The system cannot find the file specified</b></i>
    It seems that we can see that there is a file present, but it also is saying that the file can not be found.
    We already tested the connection with a separate FTP program, and here we have no errors in retrieving the file.
    Has anybody got a clue what we are doing wrong???
    Thanks in advance!
    Peter

    Hi Peter,
    which Tool do you use as FTP-Client (WS_FTP)?
    Make sure taht you refresh the client (F5); WS_FTP does not automatically refresh.
    But I also suggest to copy and paste the filename agin from folder on server into your communication channel.
    Sometimes the filenames are different, but the eyes are to tired
    Greetz Mario

  • Problem with UTL FILE COPY

    Hi,
    I am facing one small problem in UTL FILE COPY package. We have an automated scheduled batch process. As a daily batch process it moves the files from one folder to other. During movement, it first copies the file from source folder to destination folder using FILE COPY package and then removes the file using FILE REMOVE package from the source folder.
    Few cases are found that the file when files are copied they are copied as 0 bytes in destination folder but the source file had 1 MB file size. The interesting part is I am unable to replicate the issue. Means when i try to run once again the package its working properly and files are copied with correct size. This kind is issue is occuring very rarely though as once in month but the question is why FILE_COPY package is not working properly sometimes.. I am unable to understand.
    Thanks a lot for going through this. Any suggestions.
    Regards,
    Ashish

    Anyhow make sure that the copy will start after the full generation of files.
    You can think like a spool file generation with huge data. In that case initially spool file available with 0 byte only. After finish of query only it shows its actual size.

  • Issue with utl file

    Hi,
    I am using UTL file to export records from table with fixed delimiter to a text file.
    It works fine except that I see an additional character @ at the end of the file in the last line.
    Can anyone let me know why are we getting this and how can we delete it..
    Thaks in advance..

    I assume, as you are saying you can see the file ok in notepad/wordpad that you are creating a text file.
    So a) what are you using to view the file in unix and b) how did you transfer the file to unix?
    When you transfer files from Windows/DOS based operating systems to unix based operating systems you have to be aware that Windows uses a CR/LF pair of characters to terminate a line (a 'newline') and unix just uses a single LF character (character 10 in the ascii table) to terminate a line.  So when you transfer the files you need to convert the CR/LF pairs into just LF characters.
    Typically this is done if you transfer the files using FTP and specify the 'mode' to be ASCII rather than BINARY.
    c:\>ftp testserver
    Connected to testserver.mycompany.com.
    220 sunny2 FTP server ready.
    User (testserver.mycompany.com:(none)): myuser
    331 Password required for myuser.
    Password:
    230 User myuser logged in.
    ftp> ascii
    200 Type set to A.
    ftp>
    This tells the FTP software that you are transferring text files and that it needs to convert newline characters, if necessary, when transferring between Windows and Unix operating systems.
    And for reference, if it's not a text file, then you must transfer in BINARY mode to ensure the files remain byte for byte the same...
    ftp> bin
    200 Type set to I.
    ftp>
    If you don't transfer text files, between different operating systems, in ASCII mode, then those files will either be missing characters or have additional characters that aren't wanted.

  • 404 errors with welcome file

    Here's a strange one.
    I've successfully deployed a test application
    with welcome-file-list directive as the only
    entry (besides required ?xml and DOCTYPE headers).
    When I attempt to access my page e.g., http://myMachine:port/testApp, the URL
    changes to read http://myMachine:port/testApp/welcome.htm as expected
    but I get 404 errors saying the page cannot be found.
    Web.xml successfully passes my XML parser so I don't think
    that is the problem.
    Any ideas?
    Thanks,
    TC Young

    Hi.
    What's the layout of your webapp directory structure? More to the point,
    your welcome.htm file should be in the root directory of your webapp. Can
    you confirm this is where you have it?
    Also, please post the relevant bits of your web.xml file here.
    Thanks,
    Michael
    TC Young wrote:
    My apologies.
    I'm running WL 6.1 on Solaris 2.6.
    The weblogic logs do not mention any 'Resource not found'
    exceptions.
    Thanks.
    "TC Young" <[email protected]> wrote:
    Here's a strange one.
    I've successfully deployed a test application
    with welcome-file-list directive as the only
    entry (besides required ?xml and DOCTYPE headers).
    When I attempt to access my page e.g., http://myMachine:port/testApp,
    the URL
    changes to read http://myMachine:port/testApp/welcome.htm as expected
    but I get 404 errors saying the page cannot be found.
    Web.xml successfully passes my XML parser so I don't think
    that is the problem.
    Any ideas?
    Thanks,
    TC Young
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Buying a book in Iphoto 8 - error with IMG file

    HI, I've just created a book using Iphoto8, and when I click on buy album I'm told there is an "error with IMG 6653 and to delete the photo or to replace it with another". I have deleted the photo from the book, I have even thrown it in the trash bin, and emptied the trash bin, closed Iphoto, turned off my computer, logged back onto Iphoto replaced the page with new photos, reviewed the entire book to ensure I had no yellow triangle warnings of low quality (there are NONE) and when I click on buy I get the same exact error "problem with IMG 6653, delete or to replace.
    Can anyone please help with this problem?
    Thanks in advance!
    Heather

    Have you tried creating a new book and starting over? It may be a damaged database file that is messed up. Event though you rebuild the library and database it might still have some reference to that photo that it can't get rid of.
    If all else fails you can rebuild the library with iPhoto Library Manager. It uses the information in the AlbumData.xml file to create a new library, leaving your current one untouched. It will keep the albums, keywords, titles, comments but not book, slideshow, calendars, etc. It should remove any reference to that bad image file. Try the first suggestion and then we'll go from there.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Error with ini files & Memory Error

    Hi All,
    I am attaching my VI which is used to save the control values, I am doing it with configuration file, but sometimes what happens my configuration file got erased completely,and my data got lost otherwise saving control values works perfectly fine,  how can I stop this so my configuration data is safe. or is there any other method to save the control values.
    2ndly, I have another error in a different vi which keeps coming (image is attached as "Memory Error"), I tried installing LV and XP again, changed the PC but problem persists.
    Could someone please try to throw some light on these issues.
    Thanks & Regards
    James
    Attachments:
    ini error.PNG ‏24 KB
    Save control values.vi ‏50 KB
    Error2.JPG ‏1 KB

    Your Error2 image is not viewable. Looks like a corrupt upload.
    Your fundamental problem lies in the first part of your code. If the INI file doesn't exist, then when you open it, a new one gets created. There is no SVALUE key, so you are trying to loop 0 times. Since the first for-loop does not execute, the INI file refnum does not get transferred through the tunnel, and subsequent INI file functions receive a null refnum. You need to either wire the refnum outside the loops or use shift registers for the refnum.
    As to your code: OK...
    You must really like whitespace, because that's the only reason I can see for having such a huge while loop that just sits there.
    You really need to learn to draw straight wires.
    You are jumping through unnecessary hoops. You are taking the control values, bundling them into a cluster, converting the cluster into an array, and then autoindexing the array while at the same time setting the "N" terminal of the for-loop. Whew!
    Skip the bundling. Just make an array directly!
    Do not wire both the "N" terminal of a for-loop and autoindex. Do one or the other. Since you have the array, just auto-index.
    The Index Array function is resizable. You do not need to place 2 of them to get the 2 values.
    Your string constants are in 2 places. You should have them in one place only. If you decide to change the names then you need to remember to change them in 2 places.

  • Out of memory error with 80Kb file?

    Hi, my pc has 2Gb of Ram, a page file that is setup correctly
    and the physical ram is almost non-used (500Mb)
    When I start DW and load a php file of 80Kb approx., it just
    hangs/locks up. When I wait for it, it gives me an "out of memory"
    error, and when you look in windows task manager, it just keeps
    hogging up ram.
    My laptop is a "simple", 1Gb Hp pavillion, and when I open
    the file there, it just works like it's supposed to, using about
    70Mb of ram, instead of the gigabyte(s) it does on my developer
    machine....
    Adjusting virtual memory has absolutely no effect.. It seems,
    after some reading, that people using 2gb of ram, have the most
    problems in this area?
    Adobe, please help here !
    EDIT: i just tested another file, 136Kb large, that loads
    normal!, so it has to do with the files in specific... If you want
    to test the files, just download "Simplemachines Forum" and load
    the "load.php" or the "post.php" files from the source directory,
    to trigger the lockup...

    mmm... just tried using a "workaround" if you still can call
    it that
    Installed a virtual machine (xp) with less than 2gigs, and it
    works... I really hope someone else has got these kind of errors
    yet.... 2500$ + software, wich I can't use for now... Using
    notepad2 for time being...

  • Error with output file code in utl (v_out_file)

    v_out_file := utl_file.fopen (r_dca.directory_name, 'GradChallenge' || TRIM(TO_CHAR(SYSDATE,'YYYYMMDD')) || '.txt', 'W');
    I was just wondering guys, the error occurs 'r_dca.directory_name'. There is an issue with r_dca, I am just stuck on what to name to put to replace it.
    the complete code is specified below
    Create or replace
    PROCEDURE Grad_Five
    IS
    v_out_file UTL_FILE.FILE_TYPE;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2(32767);
    v_header VARCHAR2(32759 BYTE);
    r_users varchar2(32759 BYTE);
    r_dca number;
    BEGIN
    -- Output file
    v_out_file := utl_file.fopen (r_dca.directory_name, 'GradChallenge' || TRIM(TO_CHAR(SYSDATE,'YYYYMMDD')) || '.txt', 'W');
    -- Header
    v_header := sysdate;
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    FOR r_users IN
    ( SELECT
    USERS.ID,
    USERS.LOGINNAME,
    USERS.FORENAME,
    USERS.SURNAME
    FROM USERS
    LOOP
    BEGIN
    UTL_FILE.PUT_LINE (v_out_file,
    r_users.ID|| ',' || r_users.LOGINNAME|| ',' ||r_users.FORENAME|| ',' ||r_users.SURNAME);
    END;
    END LOOP;
    FOR r_users in
    ( SELECT COUNT (ID) from Users )
    LOOP
    BEGIN
    UTL_FILE.fclose (v_out_file);
    END;
    END LOOP;
    COMMIT;
    END GRAD_FIVE;
    Would appreciate help, Thank you again.

    Here's something that might help:
    (Example 1)
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/u_file.htm
    You need to:
    1. Create a directory:
    CREATE DIRECTORY EXAMPLE_DIR AS '<OS_DIR_PATH>';
    Eg: CREATE DIRECTORY EXAMPLE_DIR AS '/temp';
    2. Reference the previously created directory:
    v_out_file := utl_file.fopen ('EXAMPLE_DIR', 'filename.extension', 'W');
    My guess is that r_dca.directory_name does not point to a directory object (Step 1) but to an absolute OS path.
    Also make sure you grant the appropriate rights on you directory:
    Eg:
    GRANT READ ON DIRECTORY EXAMPLE_DIR to <your_user>;
    Edited by: RMi on Feb 2, 2012 6:07 AM

  • Issue with UTL FILE, does not read directory path

    Hi Guys
    I have created a procedure using a UTL_File, but when I execute that procedure, it comes with an invalid directory path.
    create directory r_bmw as 'C:\BMW';
    grant read, write on directory r_bmw to bmw;
    The above have been created successfully. (r_bmw is the Directory Name. C:\BMW is the directory path.)
    Below is my code:
    create or replace
    PROCEDURE DCA_BMW_OUT
    IS
    -- Declare all variables as reference
    v_out_file UTL_FILE.FILE_TYPE;
    v_row_Count NUMBER;
    r_bmw NUMBER;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2 (32767);
    v_records NUMBER;
    body_output varchar2(32759 BYTE);
    dictionary_guarantorsexist varchar2 (1 Char);
    -- Text required within this part of the procedure
    v_body varchar2(32767 BYTE);
    v_header VARCHAR2(32759 BYTE);
    BEGIN
    --- Directories have been created
    FOR r_bmw IN
    ( SELECT *
    FROM dcaadditionaldata
    WHERE directory_name IS NOT NULL
    ) LOOP
    -- inner loop produces the rows in each file
    -- outer loop identifies each of the dca's you want to generate a file for
    BEGIN
    -- Output file to be added into the directory specified
    v_out_file := utl_file.fopen (r_bmw.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
    -- The Header data which will be outputted to the file
    v_header := 'KennzeichenBrgschaftsforderungGesamtforderung|Währung|Übergabedatum|DifferenzierungAnwalts-oderInkassofall|MainMarktpartnernummer|
    MainAnrede|MainTitel|MainName|MainVorname|MainStraße|MainHausnummer|MainPLZ|MainOrt|MainLand|MainGeburtsdatum|MainTelefonnr.Schuldner|G1Marktpartnernummer
    |G1Anrede|G1Titel|G1Name|G1Vorname|G1Straße|G1Hausnummer|G1PLZ|G1Ort|G1Land|G1Geburtsdatum|G1Telefonnr.Schuldner|G2Marktpartnernummer|G2Anrede|G2Titel|
    G2Name|G2Vorname|G2Straße|G2Hausnummer|G2PLZ|G2Ort|G2Land|G2Geburtsdatum|G2Telefonnr.Schuldner|G3Marktpartnernummer|G3Anrede|G3Titel|G3Name|G3Vorname|
    G3Straße|G3Hausnummer|G3PLZ|G3Ort|G3Land|G3Geburtsdatum|G3Telefonnr.Schuldner|G4Marktpartnernummer|G4Anrede|G4Titel|G4Name|G4Vorname|G4Straße|G4Hausnummer|
    G4PLZ|G4Ort|G4Land|G4Geburtsdatum|G4Telefonnr Schuldner|G5Marktpartnernummer|G5Anrede|G5Titel|G5Name|G5Vorname|G5Straße|G5Hausnummer|G5PLZ|G5Ort|G5Land|
    G5Geburtsdatum|G5Telefonnr.Schuldner|Kundennr.|Bestandsnr.|Finanzierungsnr.|KennzeichenFinanzierung/Leasing|Kennzeichenprivat/gewerblich|
    reguläresVertragsende|Laufzeit|Vertragsdatum|Vertragsstatus|Ratenbetrag|Filiale/Gebiet|Finanzierungstyp|BankverbindungKonto|BankverbindungBLZ|
    RSVKennzeichen|Kündigungsdatum|Modell|Fahrgestellnummer|KFZKennzeichen|KFZZulassungsdatum|CoD1Marktpartnernummer|CoD1Anrede|CoD1Titel|CoD1Name|
    CoD1Vorname|CoD1Straße|CoD1Hausnummer|CoD1PLZ|CoD1Ort|CoD1Land|CoD1Geburtsdatum|CoD1Telefonnr.Schuldner|CoD2Marktpartnernummer|CoD2Anrede|CoD2Titel|
    CoD2Name|CoD2Vorname|CoD2Straße|CoD2Hausnummer|CoD2PLZ|CoD2Ort|CoD2Land|CoD2Geburtsdatum|CoD2Telefonnr.Schuldner|CoD3Marktpartnernummer|CoD3Anrede|
    CoD3Titel|CoD3Name|CoD3Vorname|CoD3Straße|CoD3Hausnummer|CoD3PLZ|CoD3Ort|CoD3Land|CoD3Geburtsdatum|CoD3Telefonnr.Schuldner|CoD4Marktpartnernummer|
    CoD4Anrede|CoD4Titel|CoD4Name|CoD4Vorname|CoD4Straße|CoD4Hausnummer|CoD4PLZ|CoD4Ort|CoD4Land|CoD4Geburtsdatum|CoD4Telefonnr.Schuldner|
    CoD5Marktpartnernummer|CoD5Anrede|CoD5Titel|CoD5Name|CoD5Vorname|CoD5Straße|CoD5Hausnummer|CoD5PLZ|CoD5Ort|CoD5Land|CoD5Geburtsdatum|
    CoD5Telefonnr.Schuldner Y|Y|5830,99|EUR|20/08/2009|DCA|4|123456|Herr||Mueller|Rainer|Messigasse|33|84432|Filz|Deutschland|01/07/1957|08912345|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||||||||||||||76543|5000234567||Lease|Privat|12/12/2013|60|12/12/2008||250,50|US|Rate|1234567890|32343450|N||BMW 320 i|W34567890PA34567|M-H-3456|09/12/2008||||||||||||||||||||||||
    N|450,80|EUR|20/08/2009|DCA|4|987654|Frau||Meier|Heide|Beinstr.|44|86353|Laus|Deutschland|03/06/1949|08987654|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||87654||8765675585|Loan|Gewerblich|14/03/2012|72|14/03/2006||500,01|DF|Select|976579657|32343450|N||BMW 500 sl|W94567890PA34568|M-H-3457|10/03/2006|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345
    Y|33970,50|EUR|20/08/2009|Lawyer|4|64646464|Frau||Schmidt|Susanne|Hueftgasse|55|89363|Maus|Deutschland|23/08/1933|08934567|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||98757|5000785675||Lease|Privat|11/11/2009|48|11/11/2005||380,70|GH|Zielrate|234567899|32343450|Y||BMW 380 s|W54567890PA34569|M-H-3458|07/11/2005||||||||||||||||||||||||
    N|10040,20|EUR|20/08/2009|Lawyer|4|4865465|Herr||Schulz|Karl|Nasenweg|77|83354|Schuh|Deutschland|18/01/1965|08972545|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||46789|50004765787||Lease|Privat|16/09/2012|60|16/09/2007||1234,56|OS|ZUS|98765432|32343450|Y||BMW 280 i|W74567890PA34570|M-H-3459|12/09/2007||||||||||||||||||||||||';
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    -- Below will output a row of data which satisfy the requirements.
    FOR body_output IN
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.DCAID = 41
    AND Dcaaccountallocation.status = 3
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    LOOP
    UTL_FILE.PUT_LINE (v_out_file,
    body_output.CUSTOMERNUMBER|| '|' || body_output.ACCOUNTNUMBER|| '|' ||body_output.CDTITLE|| '||' ||body_output.CDFIRSTNAME || '|||||' ||
    body_output.CDLASTNAME|| '||||' || body_output.ACCOUNTTYPE|| '|' ||body_output.ORIGINALCONTRACTENDDATE|| '||||' ||body_output.CONTRACTTERM || '|||||' ||
    body_output.CONTRACTENDDATE|| '|' || body_output.BRANCHAREA|| '||' ||body_output.PRODUCTTYPE|| '||' ||
    body_output.HOUSEBANKACCOUNT|| '|||' || body_output.CARMODEL|| '||||' ||body_output.CARLICENCE|| '|' ||
    body_output.ARREARSBALANCE|| '||||' || body_output.CODEBTOR|| '|' ||body_output.GUARANTORnumber);
    END LOOP;
    -- UTL_FILE.fclose (v_out_file);
    -- EXCEPTION
    --WHEN OTHERS THEN
    --UTL_FILE.put_line (v_out_file, 'failed');
    -- If any errors occur when closing the file, then we close the opened file.
    IF utl_file.is_open(v_out_file) THEN
              UTL_FILE.put_line (v_out_file, 'failed');
    UTL_FILE.fclose (v_out_file);
    END IF;
    END;
    UPDATE DebtEpisodes
    SET handoverdate = null
    WHERE DCAORLAWYER = 'DCA'
    AND accountid IN
    ( SELECT accountid
    FROM Dcaaccountallocation
    WHERE Dcaaccountallocation.status = 3
    AND Dcaaccountallocation.dcaid = 41
    END LOOP;
    END DCA_BMW_OUT;
    -- It compiles successfully, but when executes, it provides me with the 'invalid directory path' error message.
    Any help?
    Thanks

    Ram wrote:
    DCAID DIRECTORY_NAME MPNO IN_DIRECTORY_NAME INVESTOR
    4     DCA_PKFO_OUT     51950     DCA_PKFO_IN     (null)
    41     INV_ALTOR_OUT     488742     INV_ALTOR_IN Y
    2     DCA_NIG_OUT     686007     DCA_NIG_IN     (null)
    3     DCA_RAF_OUT     777163     DCA_RAF_IN     (null)
    21     INV_INFOSCORE_OUT 3482400     INV_INFOSCORE_IN     Y
    22     INV_HOIST_OUT     2866813     INV_HOIST_IN     Y
    Above is the output when select * from dca additional data.
    I have edited the r_bmw to varchar (32757 BYTE);
    however, the same errors still appear. Would I need to change the select statement to a different table...and not dca additional data?
    ThanksSo you have created a directory name r_bmw
    create directory r_bmw as 'C:\BMW';
    grant read, write on directory r_bmw to bmw;And your are querying select * from dca additional data, which doesn't return your recently created directory.... So... what to do what to do.... You should query the all_directories with directory_name = 'r_bmw'.

  • OutOfMemory error with executable file

    I'm a plant scientist not a Java programmer, so apologies for naivety or lack of clarity here. I am trying to help a colleague who consistently gets a java.lang.OutOfMemoryError when running an .exe file provided as part of a freeware academic version of a bioinformatics package. The full commercial version would be supplied as jar files and the company gives the obvious advice on how to fix the error in this case: issue the command
    java -Xmx256m -jar THEPROG.jar [followed by program-specific options] where THEPROG represents the program in question. However this won't work with the exe version, which is presumably just a compiled stripped-down form of the Java original. Is there any way we can overcome this error? We are currently running J2RE SE (version 1.4.2_02) which is part of our standard Windows XP desktop build; the problem is independent of system memory availability, and I've reproduced it with other versions of JRE/JDK. The other exe file released as part of the same freeware package runs fine, but is less computationally demanding.
    Thanks in advance

    Thanks to cotton.m, ChuckBing and mimi_tan1985 for your replies. The exe file doesn't accept options of the form -Xmxnnn. Unfortunately the originator of the software doesn't document which program was used to create the exe file from the Java classes/jars, and it doesn't provide support for the freeware version, though it's widely used in the academic community as it performs superbly when it works. The documentation is sketchy and provides no info on changing memory allocation for the exe version, only for the jar version.
    It looks as though we will either have to break our bigger jobs up into multiple small jobs which will run OK, or find the $2000 or so we need to buy the full version.
    Thanks again for your help.

  • Home Sync errors with Chrome files

    Recently a bunch of users in our office have been getting constant Home Sync errors, most commonly with Google Chrome files. File Sync opens and lists a number of errors syncing files including:
    Favicons
    History
    History Index 2012-02
    History index 2012-03
    Network Action Predictor
    Shortcuts
    Web Data
    among others. Any idea what's going on? Are the files locked by Chrome or something so Home Sync generates errors? Did something change in Lion or Chrome in the last few weeks because this never happened previously?
    Lion 10.7.3
    Chrome 17.0.963.65

    I ended up having to enforce this from our Open Directory server. You could uncheck "Library" from your homesynced folders on a per machine basis but that will have other consequences because things you would like to have backed up/synced won't be.
    From our mac server: Workgroup Manager->(Computer group name you want to manage)->Preferences->Mobility->Preference Sync->At logout+manually
    So I don't have it sync on login or in the background, only when they are logging out, hopefully warnings won't show up or it will be less intrusive.
    Homesync still has a lot of rough edges, I wish there was a cleaner option

Maybe you are looking for

  • After updating my ipod i have lost apps and music how do i retrieve them

    I just updated my ipod touch to the latest version and have now noticed that my apps and some of my music have disappeared? I recall itunes saying that my ipod have been synced to another computer (but this isn't the case, I have only ever synced my

  • Business object attachment to workflow

    Hi all, I have a workflow for BO BKPF (accounting document - journal entry).  The book "Practical Workflow for SAP" implies I can attach a reference to an SAP Business Object (page 91). For example, in my workflow for accounting document 1000459516,

  • Business Objects in Vista

    Hi everyone! I am trying to make my first steps in Business Objects and i am trying to install Business Objects Data Integrator with Windows Vista. I recieve the error message that this product use Windows NT 4.0 or higher. I saw a message saying tha

  • Need help on coverting sql statement to NamedQueries

    hi, all, I have a problem on converting the following SQL statement returning last 10 records from an Oracle database. The SQL statement is as followings: select * from (select * from TABLE1 where ATT1 = 1 order by ATT2 desc) where rownum<11 However,

  • HT4972 How do I erase my iPad then update to ios5

    How do I erase my iPad then update to ios5 anyone pls, I was trying to update to ios5, and was ask to erase then update.