How to capture user name and date in the database

How to capture the person name who edits the application and the date of edit in the database...
Pallavi

Hi
There are substitution strings you can use for this purpose.
1.APP_USER ------is the current user running the application
2.SYSDATE --------represents the current date on the database server
APP_USER Syntax
Bind variable------ :APP_USER
PL/SQL------- V('APP_USER')
Substitution string---------- &APP_USER.
SYSDATE_YYYYMMDD Syntax
Bind variable------- :SYSDATE_YYYYMMDD
Direct PL/SQL------- APEX_APPLICATION.G_SYSDATE (DATE DATATYPE)
PL/SQL-------- V('SYSDATE_YYYYMMDD')
Your application will be based on a table with primary key column. You create a 'before update trigger' on that table and add columns 'UPDATED_ON' and 'UPDATED_BY' to that table. Add the following to that trigger:
:NEW.UPDATED_ON := SYSDATE;
SELECT V('APP_USER') INTO :NEW.UPDATED_BY FROM DUAL;
-Priyanka

Similar Messages

  • How to Assign User name and password to the login screen on button click without user type...

    Hi,
    My requirement is as follows,
    I have three inputs which is User name, Password and URL. URL may be like anything like for example gmail,yahoo,hotmail like that.
    No need to authenticate the URL. Just i want to place the credentials in User ID and Password controls.
    On button click the URL should open in browser and the credentials should place in the controls in log in page.
    How to achieve it. Ultimate thought is the user should know the "Password",only admin know the password.
    Thanks & Regards
    Poomani Sankaran

    Hello,
    If URL's are internal (not third party) then you can do this by modifying both applications. If you are trying to do this with third party then you have to contact product owner. I don't think there is any code or solution for third party application where
    you can set values of controls.
    For internal URL's you can create custom web service and call this web service in both the applications. One to get value from first app and then second to set value in another app.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to pass user name and password in openConnection method ?

    Hi, Exports,
              I am trying to post data from applet to another application which is
              protected by network password.
              How to pass user name and password when I use openConnection method? In java
              doc, this method looks like do not accept these two parameters.
              Thanks
              ----- my code in applet ---------
              URL url = new URL("http://127.0.0.1/xml/index.cfm");
              URLConnection connection = url.openConnection();
              connection.setDoInput(true);
              connection.setDoOutput(true);
              connection.setUseCaches(false);
              connection.setAllowUserInteraction(false);
              DataOutputStream dos = new DataOutputStream(connection.getOutputStream());
              dos.writeBytes("POST " + path + " HTTP/1.0\r\n");
              dos.writeBytes("Referer: http://127.0.0.1/XML/index.cfm\r\n");
              dos.writeBytes("Content-Type:
              multipart/form-data;boundary=---------------------------7d0b414b04\r\n");
              dos.writeBytes("Host: "+host+":"+port+"\r\n");
              dos.writeBytes("Content-Length:" + buff.length()+"\r\n");
              dos.writeBytes("Connection: Keep-Alive\r\n\n");
              dos.writeBytes("-----------------------------7d0b414b04\r\nContent-Dispositi
              on: form-data;name=\"xmlDoc\"\r\n\r\n");
              dos.writeBytes(buff.toString());
              dos.writeBytes("\r\n-----------------------------7d0b414b04--\r\n");
              dos.close();
              

    you need to negotiate Authentication in ur applet code...
              For example:
              If u r using Form based auth u need to send Post a request with j_user_name &
              j_password to the action j_security_check. and when server returns back the
              cookie
              u need to hold it and pass that cookie to the each and every request made to the
              protected application.
              Basically u need to imitate the browser.
              regards
              aseem
              David wrote:
              > Hi, Exports,
              >
              > I am trying to post data from applet to another application which is
              > protected by network password.
              > How to pass user name and password when I use openConnection method? In java
              > doc, this method looks like do not accept these two parameters.
              >
              > Thanks
              >
              > ----- my code in applet ---------
              > URL url = new URL("http://127.0.0.1/xml/index.cfm");
              > URLConnection connection = url.openConnection();
              > connection.setDoInput(true);
              > connection.setDoOutput(true);
              > connection.setUseCaches(false);
              > connection.setAllowUserInteraction(false);
              > DataOutputStream dos = new DataOutputStream(connection.getOutputStream());
              > dos.writeBytes("POST " + path + " HTTP/1.0\r\n");
              > dos.writeBytes("Referer: http://127.0.0.1/XML/index.cfm\r\n");
              > dos.writeBytes("Content-Type:
              > multipart/form-data;boundary=---------------------------7d0b414b04\r\n");
              > dos.writeBytes("Host: "+host+":"+port+"\r\n");
              > dos.writeBytes("Content-Length:" + buff.length()+"\r\n");
              > dos.writeBytes("Connection: Keep-Alive\r\n\n");
              > dos.writeBytes("-----------------------------7d0b414b04\r\nContent-Dispositi
              > on: form-data;name=\"xmlDoc\"\r\n\r\n");
              > dos.writeBytes(buff.toString());
              > dos.writeBytes("\r\n-----------------------------7d0b414b04--\r\n");
              > dos.close();
              >
              > ------------------------------------------
              

  • How to validate user name and password in webdynpro.

    Dear All,
    Actually i have created login name and password in view, webdynpro and want to validate the user name and password but  i am not finding proper code to  how to validate user name and password.
    Pl do the needful help.
    Regards.
    Tazeer.
    Moderator Message: There is a seperate forum for WebDynpro. Please ask your question there.
    Edited by: kishan P on Oct 5, 2010 1:08 PM

    Hello, I don´t get you question. User authentication is ready out of the box in webdypro...
    Regards Otto

  • How to suffix user name and password remote pc in shutdown /s command

    Hi,
    We can shutdown a remote pc  using " shutdown /s /m \\ipaddress " command, only if password of remote pc is stored in windows credential  manager.
    But how to  add user name and password when i execute the command for example : when we map a share folder on our pc we use below command with  user name and password
    "net use * \\ipaddress\share password /user:username "
    can we give user name and password of remote pc  while we give shutdown command to turn off  a remote pc (without adding user name and password to windows credentials).
    Thanks in advance..........

    Hello Jayanth kundar,
    Based on my test, I can use the command shutdown /s /m \\10.157.21.77 to shutdown the remote computer when the have the same username and password.
    Do you mean that you want to add user name and password when you want to shutdown the remote computer?
    I can't find a user name and password in Windows Credential Manager, please share us a screenshot.
    Best regards,
    Fangzhou CHEN
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How do I get the user name and password for the Apple Extreme Router to connect to a Slingbox

    How do I get the user name and password for the Apple Extreme Router to set up my Slingbox?  It will not accept the Apple Extreme Name and password.

    The AirPort Extreme does not have a User Name, but it does have a device name and device password, which you may have already tried.
    There is also a Wireless Network Name and Wireless Network Password for the AirPort Extreme, which might be what the Slingbox is looking for if you are trying to connect it to your wireless network.
    There are no other "user names" or "passwords" on the AirPort Extreme.
    You established the device name, device password, wireless network name and wireless network password when you originally configured the AirPort Extreme.
    If you cannot remember these, you will need to perform a Soft Rest to reset everything. Follow the instructions in this Apple support document:
    Resetting an AirPort Base Station or Time Capsule FAQ

  • My moms computer died we are putting the old drive into the new computer as a slave drive. how do I transfer all the bookmarks, user names and passwords from the old drive to the new drive?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/889318]]</blockquote>
    Hello,
    Sorry if this posted twice I am NEW. I thought I could just go back to what I typed and add to it. Mom had a computer it died they are putting in the old drive on the new computer as a slave. What are the steps I need to do to transfer ALL the bookmarks, user names and passwords onto the new computer. We will have 3 desktops do we have to do the same steps on each desktop? I do not want to re enter all the user names and passwords on the new hard drive. Old computer was Windows XP the new computer is Windows 7 Kathryn Schwartz

    Duplicate - https://support.mozilla.com/en-US/questions/889318

  • Reading MS Project column names and data on the fly from a selected View

    Hi guys,
    I have several views on my project file (MSPROJECT 2010) and I want to build a macro so that;
    1. User can select any view ( Views can have diffrent columns and the user may add new columns as well)
    2. User runs the Macro and all the coulmns along with the tasks displayed in the view will be written to a excel file. ( I don't want to build several macro's for each view, I'm thinking of a common method which would work for any selected view)
    The problem I'm facing is that how will i read the column names and data for a particular view on the fly without hard coding them inside the vba code ?
    The solution needs to work on a master schedule as well.
    Appreciate your feedback.

    Just to get you started the following code writes the field name and data for the active task to the Immediate window.
    Sub CopyData()
    Dim fld As TableField
    For Each fld In ActiveProject.TaskTables(ActiveProject.CurrentTable).TableFields
    If fld.Field >= 0 Then
    Debug.Print Application.FieldConstantToFieldName(fld.Field), ActiveCell.Task.GetField(fld.Field)
    End If
    Next fld
    End Sub
    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

  • How to change the default password file's name and path when the database created?

    how to change the default password file's name and path when the database created?
    null

    Usage: orapwd file=<fname> password=<password> entries=<users>
    where
    file - name of password file (mand),
    password - password for SYS and INTERNAL (mand),
    entries - maximum number of distinct DBA and OPERs (opt),
    There are no spaces around the equal-to (=) character.

  • How to save user name and system date in a table

    I have a form that allow users to enter some information...
    I want to save user name in one of the columns and system date in another column by default when the user submit the form to save data...
    Please advice...
    Thanks

    Hi talbo,
    The most reliable method is to use a before-insert trigger on your table. This way the columns will be set properly no matter how rows are inserted (via your app or any other means). Given your user name column is called "CREATE_USER" and your date column is called "CREATE_DATE" for example - include these lines in a before-insert trigger:
    :NEW.CREATE_USER := NVL(V('APP_USER'), USER);
    SELECT SYSDATE INTO :NEW.CREATE_DATE FROM DUAL;The NVL(V('APP_USER'), USER) will set CREATE_USER to the current ApEx application user if the row is created from within the application, or to the current database user if the row is created outside the application.
    Hope this helps,
    John
    If you find this information useful, please remember to mark the post "helpful" or "correct" so that others may benefit as well.

  • How can I hide the user name and password from the url address?

    Good afternoon every body,
    I have a form running with Oracle9i Developer Suite Release 2 and when I run the form on the web it shows the user name and password of my data base. Can anyone of you please help me to hide the user name and password, if there's any way of course?.
    Thanks a lot!!.

    Luis,
    Then, as inolau's notice, create logon screen (or use the default one) and force the users to logon at runtime. Do not pass username/password as parameters.
    inolau,
    True that if the connection is specified in the config it will be the same for everyone. However, every case is different. For example one of our apps gets S3 credentials (from non-Oracle S3) as session parameters. It uses this common db connection to validate some stuff with the database, read security definitions and then it re-connects the forms using the credentials.

  • How to print file name and date on document

    How can we print the file name and date, like in the old days, on a document as a header or footer?

    Not the print dialog for iWork but in the app itself. Here is Pages:
    Regards,
    Colin R.

  • How come firefox does not remember my user name and password for the verizon wireless website ? or verizon wireless ?

    how come when i log onto the verizon wireless web site to pay my bill, i have to sign my user name and password every time ? i am not getting the firefox pop up asking me if i want firefox to save my password for this site. so how do i get firefox to remember my log in information for my verizon wireless website ? thank you.

    This would be verizonwireless.com, correct? Their site requests that browsers should not save information for its login form.
    If you're comfortable with using bookmarklets, there's one here that should force Firefox to remember:
    https://www.squarefree.com/bookmarklets/forms.html#remember_password .

  • How to list column names and data types for a given table using SQL

    I remember that it is possible to use a select statement to list the column names and data types of databaase tables but forgot how its done. Please help.

    You can select what you need from DBA_TAB_COLUMNS (or ALL_TAB_COLUMNS or USER_TAB_COLUMNS).

  • Generating CSV file with column names and data from the MySQL with JAVA

    Hi all,
    Give small example on ...
    How can I add column names and data to a CSV from from MySQL.
    like
    example
    sequence_no, time_date, col_name, col_name
    123, 27-apr-2004, data, data
    234, 27-apr-2004, data, data
    Pls give small exeample on this.
    Thanks & Regards
    Rama Krishna

    Hello Rama Krishna,
    Check this code:
    Example below exports data from MySQL Select query to CSV file.
    testtable structure
    CREATE TABLE testtable
    (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    text varchar(45) NOT NULL,
    price integer not null);
    Application takes path of output file as an argument.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    public class automateExport {
        public static void main(String[] args) {
            DBase db = new DBase();
            Connection conn = db.connect(
                    "jdbc:mysql://localhost:3306/test","root","caspian");
            if (args.length != 1) {
                System.out.println(
                        "Usage: java automateExport [outputfile path] ");
                return;
            db.exportData(conn,args[0]);
    class DBase {
        public DBase() {
        public Connection connect(String db_connect_str,
                String db_userid, String db_password) {
            Connection conn;
            try {
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                conn = DriverManager.getConnection(db_connect_str,
                        db_userid, db_password);
            } catch(Exception e) {
                e.printStackTrace();
                conn = null;
            return conn;
        public void exportData(Connection conn,String filename) {
            Statement stmt;
            String query;
            try {
                stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                        ResultSet.CONCUR_UPDATABLE);
                //For comma separated file
                query = "SELECT id,text,price into OUTFILE  '"+filename+
                        "' FIELDS TERMINATED BY ',' FROM testtable t";
                stmt.executeQuery(query);
            } catch(Exception e) {
                e.printStackTrace();
                stmt = null;
    Greetings,
    Praveen Gudapati

Maybe you are looking for

  • How do I add an input source besides English in Gnome Shell? [SOLVED]

    Hello. I'm a bit confused as to how I should add additional languages/input sources in Gnome Shell. When I ran Gnome Shell in Ubuntu, I could add additional input sources via the Region & Language section of the Gnome control panel, but in Arch I've

  • Handling unit output

    Hi All,   Hope you all are doing well. I have a small query. I did all the configuration of packing..Packing is coming automatically during delivery.. But my query is how to see and configure the handlimg unit output. Kindly sugeest me and send some

  • Need clarification on SATA and PC3200

    First of all thanks to all who replied to my first question, I robbed a 3.5 drive out of an old computer and will use it to load driver then remove it.  Or I may copy those drivers to cd and see what happens. Is it possible to do this and not have to

  • Fontconfig folder in home directory

    Somehow this folder is created in my homedirectory containing .cache-[[:digit:]] files. Does anybody experience the same and maybe know why ?

  • Dropdown Menu with Accordion widget

    Hallo, Ich habe folgendes Problem. Ich habe mit dem Accordion Widget ein Dropdown Menü erstellt. Ich möchte gerne, dass sich dieses Menü nicht wieder schließt wenn ich z.B auf Start klicke. Der Start Menüreiter hat 3 unter themen und diese sollen imm