Home » Developer & Programmer » Forms » how i display a sysdate and user on the display item form (merged) (pls write)
how i display a sysdate and user on the display item form (merged) [message #470044] Sat, 07 August 2010 11:02 Go to next message
fahady
Messages: 8
Registered: July 2010
Location: sindh
Junior Member
please correct this query also a button click the trigger used when button press event user then the write this query please correct them

SELECT USER INTO :BLOCK3.DISPLAY_ITEM7 FROM DUAL;
Re: how i display a sysdate and user on the display item form (merged) [message #470047 is a reply to message #470044] Sat, 07 August 2010 11:26 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Looks valid to me. What is the problem?
Re: how i display a sysdate and user on the display item form (merged) [message #470048 is a reply to message #470047] Sat, 07 August 2010 11:29 Go to previous messageGo to next message
fahady
Messages: 8
Registered: July 2010
Location: sindh
Junior Member
i send to fmb file so please resolve this problem ok and send to this file
  • Attachment: check.fmb
    (Size: 40.00KB, Downloaded 1025 times)
Re: how i display a sysdate and user on the display item form (merged) [message #470052 is a reply to message #470048] Sat, 07 August 2010 11:48 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why are you selecting sysdate from emp? Why not use dual like you have above?
And why are you using a when-new-item-instance-trigger on the button instead of when-button-pressed?
Re: how i display a sysdate and user on the display item form (merged) [message #470053 is a reply to message #470052] Sat, 07 August 2010 11:50 Go to previous messageGo to next message
fahady
Messages: 8
Registered: July 2010
Location: sindh
Junior Member
sir i request please correct that this task that send your file dont reply the message and please correct query on the form and send to me

thanks
Re: how i display a sysdate and user on the display item form (merged) [message #470054 is a reply to message #470053] Sat, 07 August 2010 11:54 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
No. We do not write code for people.
Change the query to select from dual.
Change the trigger to the correct type.
Re: how i display a sysdate and user on the display item form (merged) [message #470055 is a reply to message #470054] Sat, 07 August 2010 11:59 Go to previous messageGo to next message
fahady
Messages: 8
Registered: July 2010
Location: sindh
Junior Member
GO_BLOCK('BLOCK3');
BEGIN
SELECT SYSDATE INTO :BLOCK3.DISPLAY_ITEM7 FROM DUAL;
END;

TO FOUND ERROR ORA-00600

please CORRECT THEM CODE AND THIS QUERY HAS WRITE IN DOWN IN WHEN BUTTON PRESS TRIGGER OK


CORRECT THIS QUERY AND and this query direct mail to me fahad_aijaz81@hotmail.com ok


plzzzzzzzzzzzz help because im very fresh person in oracle
Re: how i display a sysdate and user on the display item form (merged) [message #470059 is a reply to message #470055] Sat, 07 August 2010 14:57 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if you don't SELECT at all, but - instead - do this:
:block3.display_item7 := sysdate;


What is your operating system? Which Forms version do you use? Is this combination certified? Because, ORA-00600 is a nasty one and usually means that you should contact Oracle Support and report the error as a bug. However, depending on information you didn't share, perhaps that can be avoided. So?

[EDIT] Forgot to mention: I don't have Forms installation here, but Cookiemonster said that you selected SYSDATE from "emp" table. If it contains more than a single record (and it most probably does), and knowing that in PL/SQL you have to SELECT INTO, you'll get TOO-MANY-ROWS. So, if you insist on select statement, use "dual", not "emp".
SQL> declare
  2    l_now date;
  3  begin
  4    select sysdate into l_now from dual;
  5  end;
  6  /

PL/SQL procedure successfully completed.

SQL> l4
  4*   select sysdate into l_now from dual;
SQL> c/dual/emp
  4*   select sysdate into l_now from emp;
SQL> l
  1  declare
  2    l_now date;
  3  begin
  4    select sysdate into l_now from emp;
  5* end;
SQL> /
declare
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 4


SQL>

[Updated on: Sat, 07 August 2010 15:02]

Report message to a moderator

Previous Topic: Unable to see a canvas on screen
Next Topic: USB Cash Drawer Opening
Goto Forum:
  


Current Time: Thu Sep 19 12:55:31 CDT 2024