Results 1 to 2 of 2

Thread: BeforeUpdate Capabilities?

  1. #1
    Bruce Troutman Guest

    BeforeUpdate Capabilities?

    I am using Enterprise Version.

    I have found the Timestamp feature of EP. I don't want to show this on the form, because it annoys the users. Can this be done?

    I must also store the User who made the add or edit in a ChangedBy field. The time to save it is just before the SQL Update. Can we update any values behind the scenes just before an INSERT or UPDATE?

    Thanks.

  2. #2
    raymond chou Guest

    BeforeUpdate Capabilities? (reply)

    Hi Bruce,

    I have a similar question....
    Subject:
    From:
    Date: Default value in the edit mode (reply)
    John ()
    8/13/99 8:57:13 PM

    Hi Raymond,

    As you can see from the example: "B8" at: http://www.aspdb.com/examples/aspdbexb08.asp, you can enter
    default values into the forms in edit (ADD) mode.

    In reading the code (or the online manual), you'll see that dbEditFlds let's you specify which fields you wish
    to have on the edit form, and what their default values are (follow the field name with brackets and the default
    value). For example:

    X.dbEditFlds = "FirstName[John Doe]"

    Would show the first name field with a default value of "John Doe" in it.

    Your question is how do you put a session variable into the default value. That's just simple ASP. Let's
    say that the session variable is called Session("myName&#34. To put that into the edit field, you'd use:

    X.dbEditFlds = "FirstName[" & Session("myName&#34 & "]"

    That's all there is to it.

    Hope this helps,
    John




    Subject:
    From:
    Date: Default value in the edit mode (reply)
    raymond chou (raymondc@jupiterair.com)
    8/14/99 2:06:18 PM

    It works. Thanks.

    Here is the code that I use.

    Session("UserID&#34 = Request.ServerVariables.Item("Logon_User&#34
    ' capture NT user account.
    Mydb.dbEditFlds = "(;|)|Changedby["& session("UserID&#34 &"]"
    ' but I cannot hide this field.....




    ------------
    Bruce Troutman at 8/17/99 3:16:47 PM

    I am using Enterprise Version.

    I have found the Timestamp feature of EP. I don't want to show this on the form, because it annoys the users. Can this be done?

    I must also store the User who made the add or edit in a ChangedBy field. The time to save it is just before the SQL Update. Can we update any values behind the scenes just before an INSERT or UPDATE?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •