Home » Developer & Programmer » Forms » Save Employees' Images From Forms (OS Win 7)
icon5.gif  Save Employees' Images From Forms [message #609343] Wed, 05 March 2014 20:25 Go to next message
gaizarda
Messages: 2
Registered: March 2014
Junior Member
Database : 10g
Forms : 10g

Hi all~ I am new to oracle forms. So I got confused about few things. Honestly I want to put this separately but I think it will be marked as spam Smile
1. I have table Employees and it's replication Employee_New. If I save data to table Employee, it will automatically saved to Employee_New. Anyone knows how to do this using trigger? I will put this trigger in Save Button.
2. How to export Employees data into .txt file using ';' as delimiter and vice versa?
3. I have another table 'Employee_Img' (Employee_Id (FK), Image_Id, and Image). I will put the image in Employee Form but when I click Save Button. The image will be saved to Employee_Img and the rest to Employees. I tried to follow this step but when I click brows it's blank like the pic below.

Sorry for the awkward english. Thanks in advance for any help Smile

UPDATE:
I manage to do the number 2. I use this step

  • Attachment: blank.JPG
    (Size: 27.29KB, Downloaded 777 times)

[Updated on: Thu, 06 March 2014 00:20]

Report message to a moderator

Re: Save Employees' Images From Forms [message #609357 is a reply to message #609343] Thu, 06 March 2014 00:18 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
  1. A database trigger might be a better option than Forms trigger. Something like this:
    SQL> create table mytab (ename varchar2(20));
    
    Table created.
    
    SQL> create table mytab_new (ename varchar2(20));
    
    Table created.
    
    SQL> create or replace trigger tai_mytab
      2    after insert on mytab
      3    for each row
      4  begin
      5    insert into mytab_new (ename) values (:new.ename);
      6  end;
      7  /
    
    Trigger created.
    
    SQL> insert into mytab (ename) values ('Littlefoot');
    
    1 row created.
    
    SQL> insert into mytab (ename) values ('OraFAQ');
    
    1 row created.
    
    SQL> select * from mytab;
    
    ENAME
    --------------------
    Littlefoot
    OraFAQ
    
    SQL> select * from mytab_new;
    
    ENAME
    --------------------
    Littlefoot
    OraFAQ
    
    SQL>

    Note that updates nor deletes aren't included in here.
  2. SPOOL the result from SQL*Plus into a .txt file, such as
    SQL> set colsep ";"
    SQL> set head off
    SQL> spool depts.txt
    SQL> select * From dept;
    
            10;ACCOUNTING    ;NEW YORK
            20;RESEARCH      ;DALLAS
            30;SALES         ;CHICAGO
            40;OPERATIONS    ;BOSTON
    
    SQL> spool off;
    If you check DEPTS.TXT, you'll see what it contains. Note that SELECT statement is included into the output; if you want to avoid that, put everything I executed (starting from SET, ending with SPOOL OFF) into a .SQL file and run that file from SQL*Plus). There are numerous SET SQL*Plus commands; check what they do in documentation.
  3. Are there any images in root directory of your C disk drive?
Re: Save Employees' Images From Forms [message #609367 is a reply to message #609357] Thu, 06 March 2014 01:20 Go to previous messageGo to next message
gaizarda
Messages: 2
Registered: March 2014
Junior Member
About the number 3, I have no pics in root C but I tried to choose D or E but it ended up the same (blank). I also use that step to another PC and show only half of the file name. Like C:\Rose\Gaizarda.jpg to se\Gaizarda.jpg. Any idea why this happen?
Thanks for the help. I really appreciate it Smile
Re: Save Employees' Images From Forms [message #609395 is a reply to message #609367] Thu, 06 March 2014 04:35 Go to previous message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I didn't test solution posted in a topic you refer to so - no idea, sorry. Try to contact the author (via private message) or post a reply in that topic.
Previous Topic: How to stop the process (merged)
Next Topic: Lov call on Disply item
Goto Forum:
  


Current Time: Thu May 16 23:13:44 CDT 2024