Check new username on update record

I used the update form wizard to update records.
I am giving the user an option to change his/her username
from this form.
The "check username" server behavior is only valid if I do an
insert record, not an update.
Is there a way to combine them? I've search and found
nothing.

David Powers wrote:
> danilocelic AdobeCommunityExpert wrote:
>> I haven't done it, but I assume that it does work.
If it doesn't, then
>> you'll need to hand code it, and I'd start off with
looking at the
>> check new user name code as a basis.
>
> The Check New Username server behavior (at least in PHP
MySQL) is
> appallingly bad. It does the job, but sends the user to
a new page,
> thereby losing all input data. In my "Essential Guide to
DW CS3", I show
> how to combine the Check New Username and Insert Record
server behaviors
> to work in a more user-friendly way. I also show how to
apply the same
> technique to an update form.
Thanks for bringing this up David. Also, this issue is
neither specific to this particular script nor limited to
Dreamweaver generated scripts. Most form processing scripts that
have any server side validation will have this same issue -- how to
limit what the user has to reenter to correct whatever the
particular issue was found. Not that you can't work around it, and
it's fairly easy to work around (as I'm sure the examples in your
book make it), if you know what you're doing.
Danilo Celic
|
http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert

Similar Messages

  • Check New Username

    On the redirect page, is there a way to display the username they're tryingto register with?
    Say I try to register using "GreatOne", and it already exist, how do I display the name "GreatOne" on the redirect page?

    Heya Brachole,
    I am also assuming you're using php. This may not answer your question but it may help. You may bypass the redirect if the username already exists for visitors that have javascript enabled. It will show the username availability in the text field as the user types the desired username. There's a demo of what I'm talking about at http://DwFAQ.info/signup_demo.php with a link to show how it's done.
    For server side validation to show the username in the redirect page if the chosen username already exists you would have to create a session variable for the text field of the username on the registration form then echo that session variable onto the redirect page. You would only need to create a session variable if your loaded more than one page after the registration form. This is because forms with method POST only carry the value to the next page and then they are destroyed. So if you wanted to carry the desired username to more than one page after the registration form then you would have to create a session variable for the POST value of the username field then echo the session variable to show the chosen username on the page. You'd do this by adding this to the page after the registration form:
    <?php
    session_start();
    session_register("username");
    $username = $_POST['username'];
    ?>
    That will create a session variable named $username from the POST value of username on the registration form.
    Then on any page you wanted to show the chosen username you'd put this code on the very first line:
    <?php session_start();?>
    That starts the session for the page.
    Then put this wherever you want to show the chosen username:
    Sorry <?php echo $_SESSION['username']; ?> already exists.
    That echos the session variable onto the page.
    If it's just one page after the registration form then the POST value is still active and you can echo the POST value onto the page. Your code would look something like this:
    Sorry <?php echo $_POST['username']; ?> already exists.
    Where username is the name for the form field on the registration page that contains the username.
    Look at this page for more information on how to create a session variable http://kb2.adobe.com/cps/165/tn_16563.html
    Hope that helps!

  • Update record with check new user

    I have a page where the already registered member can create
    a username and password to access the secure part of my site. I
    need to be able to 1) check for uniqueness of username (no
    duplicates) , 2) validate my fields (password, confirm password,
    email address)
    Is there a way to apply the check new username behavior to
    the update record server behavior I have in place?
    thanks,
    Rob

    In the server behaviors panel with the submit button
    selected, from the (+) button choose User Authentication then Check
    New Username. There you can set uniqueness and requirements. From
    there, on the behaviors panel (not server behaviors), again with
    the submit button selected, select the (+) button and choose
    Validate Form. From there you can set requirements and validations.
    That should at least help.

  • Check new user SB and pureupload ASP user

    Hello,
    ASP
    I was wondering has any one used the dw SB "Check New
    Username" with
    pureupload.
    I have a form with a textfield and a file field. I want my
    user to add an
    image and an SKU. I want to be sure the sku is unique, I want
    to use the
    "Check New Username" but I cannot seem to get it to work.
    I am calling the vairable like this in my check new user
    query
    UploadFormRequest("picrefsku")
    if any one has done this before or can add any input am
    grateful
    regards
    k

    this is the code for the check new user
    this UploadFormRequest("ininbutt") is rfom the form button,
    when the form is
    submitted then this should be finred, but its not the case.
    <%
    ' *** Redirect if username exists
    MM_flag = UploadFormRequest("ininbutt")
    If (CStr(Request(MM_flag)) <> "") Then
    Dim MM_rsKey
    Dim MM_rsKey_cmd
    MM_dupKeyRedirect = "ffff.asp"
    MM_dupKeyUsernameValue = CStr(Request.Form("ggg"))
    Set MM_rsKey_cmd = Server.CreateObject ("ADODB.Command")
    MM_rsKey_cmd.ActiveConnection = MM_connpeepeek_STRING
    MM_rsKey_cmd.CommandText = "SELECT imagesku FROM
    piddle.ps_usr_image WHERE
    imagessku = ?"
    MM_rsKey_cmd.Prepared = true
    MM_rsKey_cmd.Parameters.Append
    MM_rsKey_cmd.CreateParameter("param1", 200,
    1, 45, MM_dupKeyUsernameValue) ' adVarChar
    Set MM_rsKey = MM_rsKey_cmd.Execute
    If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
    ' the username was found - can not add the requested
    username
    MM_qsChar = "?"
    If (InStr(1, MM_dupKeyRedirect, "?") >= 1) Then MM_qsChar
    = "&"
    MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar &
    "requsername=" &
    MM_dupKeyUsernameValue
    Response.Redirect(MM_dupKeyRedirect)
    End If
    MM_rsKey.Close
    End If
    %>

  • How can I change my iphone username to update apps and download anything with the new email I have today?

    how can I change my iphone username to update apps and download anything with the new email I have today?

    Before you make an apple ID with the new email, go to appleid.apple.com.  login with your old email and password. change your old email to your new one. Now you can use your new email as your apple id, but beware if you go through the process of creating a new appleid with your new email address you will not be able to attach your old account to your new email.

  • Apps tab of Creative Cloud desktop helper constantly displays "Download error. press retry or contact customer support". I've quit CC desktop helper, restarted computer, checked network settings, relogged in. Cannot download any new apps or updates. HELP

    Apps tab of Creative Cloud desktop helper constantly displays "Download error. press retry or contact customer support". As well as reloading, I've also quit CC desktop helper, restarted computer, checked network settings, relogged in. Cannot download any new apps or updates. please help.
    System: Mac OSX 10.9.4. 3.4ghz intel core i7, 8gb ram

    Hello,
    Adobe has brought these new links in this matter:
    Troubleshoot Creative Cloud download and install issues and
    App doesn’t open; progress wheel spins continually
    Please have a look there. If necessary and for further questions click through http://helpx.adobe.com/contact.html and if "open" please use chat, I had the best experiences. I quote from Preran: The chat button is activated as soon as there is an agent available to help.
    Good luck!
    Hans-Günter

  • I recently changed my username n password. Now that I'm trying to update my apps, it still default at my old username. How can I change it to new username?

    I recently changed my username n password. Now that I'm trying to update my apps, it still default at my old username. How can I change it to new username?

    Sorry, you can't. Apps are forever tied to the Apple ID used to originally obtain them. They cannot be updated using any other Apple ID, nor can they be transferred to another Apple ID. You will have to update them using the ID used to originally obtain them.

  • When I updated from Snow Leopard to Lion, a new username was created. I want to merge old   new username

    When I updated from Snow Leopard to Lion, a new username w/administrative powers was created. Trying to merge old w/ new and retain all photos, music, etc of each but can't figure it out. Any ideas on how to do so?

    I ended up calling Apple Tech Support for help on this.  Got directed to a Mail expert.  He had me move the following files from my home Library file folder.
    ~\Library\Mail\V2\MailData\Envelope Index
    ~\Library\Mail\V2\MailData\Envelope Index-shm
    ~\Library\Mail\V2\MailData\Envelope Index-wal
    Then he asked me to quit Mail and then restart it again.  When it restarted, it imported the mail (which the original migration had not done before).  This solved about 90% of the problems.  In my old mail folder in Snow Leopard, I had a Mail folder called Archive.  Since this is now a reserved folder name, the import to Mountain Lion choked and it created five duplicates of this folder and its subfolders.  I just deleted these and then went to Time Machine and brought in a single copy.  The Rules and Smart Folders I had were gone and couldn't be resurrected, so had to spend some time and rebuild them by hand.  But, now it all seems to be working well.

  • SQL to check date and send email and Update Record

    Hii,
    USING ASP AND ACCESS
    I am implementing a classified section for my website and I
    am displaying
    everything successfully.
    When the user posts the classified he selects how many days
    he wants his
    POST like 10 days, 20 days or 30 days and i can successfully
    show the posts
    So if the user posts on says 1st of July 2006 and selects 10
    days for his
    post to be showed on my website
    THEN
    8th July 2006 an email shud go to him saying if he wants to
    keep his POST
    for another 10 days, 20 days or 30 days with 3 links
    and IF YES the 1st july 2006 date must be changed to
    Date of Post + Number of days selected initially + Number of
    days selected.
    I am using two columsn in the DB for this date thing one is
    the strPostDate
    and strAddDate
    So basically the number of days selected for the post to be
    shown on the
    website keeps adding up each time the user clicks on the link
    for 10 days,
    20 days or 30 days with 3 links
    please help need it badly :-)

    Hi,<br />How is the date format in the toolbox control panel?<br /><[email protected]> wrote in message <br />news:[email protected]..<br />> OK, my bad. It is doing it as a yyyy-mm-dd format. Which is what I want. <br />> However, if I do go to update the page the good news is the correct date <br />> is in there in the correct format. However, if I click on the date picker, <br />> it starts out as April, 2192 and the scroll bar is over part of the <br />> Thursday dates in the calendar. This is on Firefox/Mac.<br />><br />> Also if I click on the Update Record/Submit button at the bottom of the <br />> page, I get an error saying 'The date format is: mm/dd/yy' which is the <br />> real bug. Sorry for the mixup.

  • Check speed of new 802.11n update

    Is there away to Check speed of new 802.11n update
    gary

    I was a little surprised how much digging around I had to do to confirm that 802.11n was active and then to find the link speed (via Network Utility) -- which was 144 Mbps. However, what I find interesting is the following.
    I have mounted a Samba drive from a SnapServer on my MacBook Pro. The SnapServer and the AEBS(n) are connected to the same switch via 100Mbps ethernet. Right now no other computers are using the network.
    I then launched Backup and told it to backup my home directory to a folder on the SMB mounted drive. It's several gigabytes of data to be backed up. I then launched Activity Monitor and have been monitoring Network traffic. I wish I could post images of the screen captures but I'll try to summarize what I'm seeing below:
    Data received/sec: ~72 KB
    Data sent/sec: ~1.8 to ~ 2.6 MB
    The graph on the right is showing the red (sent) packets peaking near the top of the display with the green (rcvd) packets along the bottom. The caption above the top is 2.54 MB/sec which I assume is the scale of Y axis.
    The CPU utilization is running 82-95% IDLE.
    Memory is pushing 60% FREE.
    Disk activity is peaking at 2.50 MB/sec.
    So, perhaps it's a network disc throughput issue in some sense but given the minimum link speed is 100Mbps between the two devices, I am surprised.
    I really expected something faster now that I have a 802.11n link; particularly given the fact that, in the past, if I connected the MacBook Pro to the network via a wired ethernet link (100Mpbs), I observed a noticeably faster throughput than over the 802.11b WiFi link. Unfortunately, I don't have numbers for comparison so it's only anecdotal. Perhaps, after this backup completes, I'll repeat it with a wired link to see if the throughput numbers are any different.
    More anecdotal evidence is that web browsing (e.g. to post this message and a visit to yahoo.com) is less speedy than it was before. Somewhere on this computer or on this network there is competition for resources.
    I'd like to hear how other people are testing their real link speeds and what kind of numbers they are seeing on the activity monitor.
    Chip
    iMac G5 and MacBook Pro   Mac OS X (10.4.9)   .Mac, Plaxo and PocketMac (for BlackBerry)

  • Mapping problem with compressed key update record

    Hi, could you please advise?
    I'm getting the following problem:
    About a week ago replicat abened with "Error in mapping" error. I found in discard file some record looking like:
    filed1 = NULL
    field2 =
    field3 =
    field4 =
    field5 =
    datefield = -04-09 00:00:00
    field6 =
    field8 =
    field9 = NULL
    field10 =
    Where filed9 = @GETENV("GGHEADER", "COMMITTIMESTAM"), field10 = = @GETENV("GGHEADER", "COMMITTIMESTAM"), others are table fields mapped by USEDEFAULTS
    So I got Mapping problem with compressed key update record at 2012-06-01 15:44
    I guess I need to mention that extract failed in 5 minuts before it with: VAM function VAMRead returned unexpected result: error 600 - VAM Client Report <[CFileInfo::Read] Timeout expired after 10 retries with 1000 ms delay, waiting to read transaction log or backup files. To increase the number of retries, use SETENV (GGS_CacheRetryCount = n) in Extract parameter file. To control retry delay time, use SETENV (GGS_CacheRetryDelay = n). handle: 0000000000000398 ReadFile GetLastError:997 Wait GetLastError:997>.
    I don't know if it has ther same source as data corruption, could you tell me if it is?
    Well, I created new extract, starting 2012-06-01 15:30 to check if there was something with extract at the time, but got the same error.
    If I run extract beging at 15:52 it starts and works.
    But well, I got another one today. Data didn't look that bad, but yet one column came with null value:( And I'm using it as a key column, so I got Mapping problem with compressed key update record again:(
    I'm replicating from SQL Server 2008 to Oracle 11g.
    I'm actually using NOCOMPRESSUPDATES in Extract.
    CDC is enabled for all tables replicated. The only thing is that it is enabled not by ADD TRANDATA command, but by SQL Server sys.sp_cdc_enable_table, does it matter?
    Could you please advise why does it happen?

    Well, the problem begins somewhere in extract or before extract, may be in transaction log, I don't know:(
    Here are extract parameters:
    EXTRACT ETCHECK
    TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
    SOURCEDB TEST, USERID **, PASSWORD *****
    exttrail ./dirdat/ec
    NOCOMPRESSUPDATES
    NOCOMPRESSDELETES
    TABLE tst.table1, COLS (field1, field2, field3, field4, field5, field6, field7, field8 );
    TABLE tst.table2, COLS (field1, field2, field3, field4 );
    Data pump:
    EXTRACT DTCHECK
    SOURCEDB TEST, USERID **, PASSWORD *****
    RMTHOST ***, MGRPORT 7809
    RMTTRAIL ./dirdat/dc
    TABLE tst.table1;
    TABLE tst.table2;
    Replicat:
    REPLICAT rtcheck
    USERID tst, PASSWORD ***
    DISCARDFILE ./dirrpt/rtcheck.txt, PURGE
    SOURCEDEFS ./dirdef/sourcei.def
    HANDLECOLLISIONS
    UPDATEDELETES
    MAP tst.table1, t.table1, COLMAP (USEDEFAULTS , filed9 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed10= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (field3);
    MAP dbo.TPROCPERIODCONFIRMSTAV, TARGET R_019_000001.TPROCPERIODCONFIRMSTAV, COLMAP (USEDEFAULTS , field5 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed6= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (filed1, field2, field3);
    Rpt file for replicat:
    Oracle GoldenGate Delivery for Oracle
    Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040
    Windows x64 (optimized), Oracle 11g on Apr 22 2011 00:34:07
    Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
    Starting at 2012-06-05 12:49:38
    Operating System Version:
    Microsoft Windows Server 2008 R2 , on x64
    Version 6.1 (Build 7601: Service Pack 1)
    Process id: 2264
    Description:
    ** Running with the following parameters **
    REPLICAT rtcheck
    USERID tst, PASSWORD ***
    DISCARDFILE ./dirrpt/rtcheck.txt, PURGE
    SOURCEDEFS ./dirdef/sourcei.def
    HANDLECOLLISIONS
    UPDATEDELETES
    MAP tst.table1, t.table1, COLMAP (USEDEFAULTS , filed9 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed10= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (field3);
    MAP dbo.TPROCPERIODCONFIRMSTAV, TARGET R_019_000001.TPROCPERIODCONFIRMSTAV, COLMAP (USEDEFAULTS , field5 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed6= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (filed1, field2, field3);
    CACHEMGR virtual memory values (may have been adjusted)
    CACHEBUFFERSIZE: 64K
    CACHESIZE: 512M
    CACHEBUFFERSIZE (soft max): 4M
    CACHEPAGEOUTSIZE (normal): 4M
    PROCESS VM AVAIL FROM OS (min): 1G
    CACHESIZEMAX (strict force to disk): 881M
    Database Version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Database Language and Character Set:
    NLS_LANG = "AMERICAN_AMERICA.CL8MSWIN1251"
    NLS_LANGUAGE = "AMERICAN"
    NLS_TERRITORY = "AMERICA"
    NLS_CHARACTERSET = "CL8MSWIN1251"
    For further information on character set settings, please refer to user manual.
    ** Run Time Messages **
    Opened trail file ./dirdat/dc000000 at 2012-06-05 12:49:39
    2012-06-05 12:58:14 INFO OGG-01020 Processed extract process RESTART_ABEND record at seq 0, rba 925 (aborted 0 records).
    MAP resolved (entry tst.table1):
    MAP tst.table1, t.table1, COLMAP (USEDEFAULTS , filed9 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed10= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (field3);
    2012-06-05 12:58:14 WARNING OGG-00869 No unique key is defined for table table1. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
    Using the following default columns with matching names:
    field1=field1, field2=field2, field3=field3, field4=field4, field5=field5, field6=field6, field7=field7, field8=field8
    Using the following key columns for target table R_019_000001.TCALCULATE: field3.
    2012-06-05 12:58:14 WARNING OGG-01431 Aborted grouped transaction on 'tst.table1', Mapping error.
    2012-06-05 12:58:14 WARNING OGG-01003 Repositioning to rba 987 in seqno 0.
    2012-06-05 12:58:14 WARNING OGG-01151 Error mapping from tst.table1 to tst.table1.
    2012-06-05 12:58:14 WARNING OGG-01003 Repositioning to rba 987 in seqno 0.
    Source Context :
    SourceModule : [er.main]
    SourceID : [er/rep.c]
    SourceFunction : [take_rep_err_action]
    SourceLine : [16064]
    ThreadBacktrace : [8] elements
    : [C:\App\OGG\replicat.exe(ERCALLBACK+0x143034) [0x00000001402192B4]]
    : [C:\App\OGG\replicat.exe(ERCALLBACK+0x11dd44) [0x00000001401F3FC4]]
    : [C:\App\OGG\replicat.exe(<RCALLBACK+0x11dd44) [0x000000014009F102]]
    : [C:\App\OGG\replicat.exe(<RCALLBACK+0x11dd44) [0x00000001400B29CC]]
    : [C:\App\OGG\replicat.exe(<RCALLBACK+0x11dd44) [0x00000001400B8887]]
    : [C:\App\OGG\replicat.exe(releaseCProcessManagerInstance+0x25250) [0x000000014028F200]]
    : [C:\Windows\system32\kernel32.dll(BaseThreadInitThunk+0xd) [0x000000007720652D]]
    : [C:\Windows\SYSTEM32\ntdll.dll(RtlUserThreadStart+0x21) [0x000000007733C521]]
    2012-06-05 12:58:14 ERROR OGG-01296 Error mapping from tst.table1 to tst.table1.
    * ** Run Time Statistics ** *
    Last record for the last committed transaction is the following:
    Trail name : ./dirdat/dc000000
    Hdr-Ind : E (x45) Partition : . (x04)
    UndoFlag : . (x00) BeforeAfter: A (x41)
    RecLength : 249 (x00f9) IO Time : 2012-06-01 15:48:56.285333
    IOType : 115 (x73) OrigNode : 255 (xff)
    TransInd : . (x03) FormatType : R (x52)
    SyskeyLen : 0 (x00) Incomplete : . (x00)
    AuditRBA : 44 AuditPos : 71176199289771
    Continued : N (x00) RecCount : 1 (x01)
    2012-06-01 15:48:56.285333 GGSKeyFieldComp Len 249 RBA 987
    Name: DBO.TCALCULATE
    Reading ./dirdat/dc000000, current RBA 987, 0 records
    Report at 2012-06-05 12:58:14 (activity since 2012-06-05 12:58:14)
    From Table tst.table1 to tst.table1:
    # inserts: 0
    # updates: 0
    # deletes: 0
    # discards: 1
    Last log location read:
    FILE: ./dirdat/dc000000
    SEQNO: 0
    RBA: 987
    TIMESTAMP: 2012-06-01 15:48:56.285333
    EOF: NO
    READERR: 0
    2012-06-05 12:58:14 ERROR OGG-01668 PROCESS ABENDING.
    Discard file:
    Oracle GoldenGate Delivery for Oracle process started, group RTCHECK discard file opened: 2012-06-05 12:49:39
    Key column filed3 (0) is missing from update on table tst.table1
    Missing 1 key columns in update for table tst.table1.
    Current time: 2012-06-05 12:58:14
    Discarded record from action ABEND on error 0
    Aborting transaction on ./dirdat/dc beginning at seqno 0 rba 987
    error at seqno 0 rba 987
    Problem replicating tst.table1 to tst.table1
    Mapping problem with compressed key update record (target format)...
    filed1 = NULL
    field2 =
    field3 =
    field4 =
    field5 =
    datefield = -04-09 00:00:00
    field6 =
    field8 =
    field9 = NULL
    field10 =
    Process Abending : 2012-06-05 12:58:14

  • How to change the status of updated record?

    Hi All,
    how to change the status of updated record?
    new record should be active version(X) and old version will be deleted.
    Plz suggest..
    Thanks in advance...

    Steve,
    In the actual question, you mentioned that the old record needs to be deleted and hence the solution provided.
    Now, you are talking about field. May I know which field are you talking about??
    Jst get in to ABAP Editor and try debugging the code with the solution provided and let us know if that is working fine or not.
    Also, I recommend you to take a look at the transaction ABAPDOCU. There you wil find hell lot of examples explaining all the scenarios. You will get a good idea .
    Please check that and try to implement it yourself. You will be able to make it after doing mistakes.
    If you stuck up again after many attempts, paste your code here. We will help you out
    Hope you got my concern.
    Thanks,
    Babu Kilari

  • Get error ORA-20505 and ORA-01403 when UPDATING record

    Hi,
    I'm running APEX 3.2.1, on Oracle XE 10.2.0.1, on Sun Ultra20 (Intel-based) running Windows Server 2003.
    I created a small, department database - to keep track of contacts, equipment, etc.
    Initially, I used a NUMBER as the PRIMARY KEY in both the CONTACTS table and EQUIPMENT tables. I created a CONTACTS interactive report and a CONTACT DETAILS form, where the EDIT button on a row in the CONTACTS report brings up the individual record to modify. Same thing for EQUIPMENT - interactive report page and form page.
    This all worked fine!
    Then, I decided to change the PRIMARY KEY for the CONTACTS table to a STRING - with CONTACT_FIRST_NAME and CONTACT_LAST_NAME as the primary key. I figured I this would prevent duplicate entries. After the change, inserts work. Updates work, IF a change is made to ANY field EXCEPT first name or last name.
    UPDATES fail - if user modifies EITHER the first name or last name - in APEX. But, update SUCCEEDS if done in SQL Developer. Obviously, I missing a subtle nuance in APEX, but I can't figure it out.
    I've included DEBUG trace and version information below.
    Thanks,
    Andy
    ORA-20505: Error in DML: p_rowid=Adam1, p_alt_rowid=CONTACT_FIRST_NAME, p_rowid2=Adam, p_alt_rowid2=CONTACT_LAST_NAME. ORA-01403: no data found
    0.02: A C C E P T: Request="SAVE"
    0.02: Metadata: Fetch application definition and shortcuts
    0.02: NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.02: alter session set nls_language="AMERICAN"
    0.02: alter session set nls_territory="AMERICA"
    0.02: NLS: CSV charset=WE8MSWIN1252
    0.02: ...NLS: Set Decimal separator="."
    0.02: ...NLS: Set NLS Group separator=","
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Setting session time_zone to -06:00
    0.02: Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY
    0.02: ...NLS: Set date format="DD-MON-YYYY"
    0.03: Fetch session state from database
    0.03: ...Check session 1896858759858984 owner
    0.03: Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY
    0.03: ...NLS: Set date format="DD-MON-YYYY"
    0.03: ...Check for session expiration:
    0.03: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.03: Session: Fetch session header information
    0.03: ...Metadata: Fetch page attributes for application 101, page 21
    0.05: ...Validate item page affinity.
    0.05: ...Validate hidden_protected items.
    0.05: ...Check authorization security schemes
    0.05: Session State: Save form items and p_arg_values
    0.05: ...Session State: Save "P21_CONTACT_FIRST_NAME" - saving same value: "Adam"
    0.06: ...Session State: Saved Item "P21_CONTACT_LAST_NAME" New Value="Adam Jr"
    0.06: ...Session State: Save "P21_CONTACT_COMPANY" - saving same value: "Atempo"
    0.06: ...Session State: Save "P21_CONTACT_JOB_TITLE" - saving same value: "Sr Sw Engr"
    0.06: ...Session State: Save "P21_CONTACT_JOB_ROLE" - saving same value: "Engineering"
    0.06: ...Session State: Save "P21_CONTACT_STATUS" - saving same value: "Active"
    0.06: ...Session State: Save "P21_CONTACT_PRODUCT" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_PHONE" - saving same value: "222-333-4444"
    0.06: ...Session State: Save "P21_CONTACT_MOBILE" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_FAX" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_EMAIL" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_STREET" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_CITY" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_STATE" - saving same value: "CO"
    0.06: ...Session State: Save "P21_CONTACT_ZIP" - saving same value: ""
    0.06: ...Session State: Save "P21_CONTACT_COUNTRY" - saving same value: "United States"
    0.06: ...Session State: Save "P21_CONTACT_NOTES" - saving same value: ""
    0.06: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.06: Branch point: BEFORE_COMPUTATION
    0.06: Computation point: AFTER_SUBMIT
    0.06: Tabs: Perform Branching for Tab Requests
    0.06: Branch point: BEFORE_VALIDATION
    0.06: Perform validations:
    0.08: ...Item in validation equals expression 2: P21_CONTACT_JOB_ROLE
    0.08: ...Item in validation equals expression 2: P21_CONTACT_STATUS
    0.08: ...Item Not Null Validation: P21_CONTACT_PHONE
    0.08: ...Item in validation equals expression 2: P21_CONTACT_STATE
    0.08: ...Item in validation equals expression 2: P21_CONTACT_COUNTRY
    0.08: Branch point: BEFORE_PROCESSING
    0.08: Processing point: AFTER_SUBMIT
    0.08: ...Process "Process Row of ISR_CONTACTS": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:ISR_CONTACTS:P21_CONTACT_FIRST_NAME:CONTACT_FIRST_NAME:P21_CONTACT_LAST_NAME:CONTACT_LAST_NAME|IU
    0.08: Show ERROR page...
    0.08: Performing rollback...
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Database     
    NAME     XE
    CREATED     06/08/2010 05:22:50 PM
    RESETLOGS_TIME     07/09/2010 10:09:59 AM
    PRIOR_RESETLOGS_CHANGE#     193066
    PRIOR_RESETLOGS_TIME     06/08/2010 05:22:52 PM
    LOG_MODE     ARCHIVELOG
    CHECKPOINT_CHANGE#     4436025
    ARCHIVE_CHANGE#     4387159
    OPEN_RESETLOGS     NOT ALLOWED
    VERSION_TIME     07/09/2010 10:08:44 AM
    OPEN_MODE     READ WRITE
    PROTECTION_MODE     MAXIMUM PERFORMANCE
    PROTECTION_LEVEL     MAXIMUM PERFORMANCE
    REMOTE_ARCHIVE     ENABLED
    DATABASE_ROLE     PRIMARY
    ARCHIVELOG_CHANGE#     4458138
    SWITCHOVER_STATUS     SESSIONS ACTIVE
    DATAGUARD_BROKER     DISABLED
    GUARD_STATUS     NONE
    FORCE_LOGGING     NO
    CGI Environment     
    PLSQL_GATEWAY     WebDb
    GATEWAY_IVERSION     2
    SERVER_SOFTWARE     Oracle Embedded PL/SQL Gateway/10.2.0.1.0
    GATEWAY_INTERFACE     CGI/1.1
    SERVER_PORT     8080
    SERVER_NAME     XDB HTTP Server
    REQUEST_METHOD     GET
    QUERY_STRING     p=4500:36:1896858759858984:::::
    PATH_INFO     /f
    SCRIPT_NAME     /apex
    REMOTE_ADDR     10.135.65.180
    SERVER_PROTOCOL     HTTP/1.1
    REQUEST_PROTOCOL     tcp
    REMOTE_USER     ANONYMOUS
    HTTP_USER_AGENT     Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 (.NET CLR 3.5.30729)
    HTTP_HOST     isr-si-project:8080

    Maybe because you're changing primary key...and then updating record with primary key that doesn't exist.

  • CS5 Update Record behaior deletes the record

    Hello
    I am having an issue that I just cant seem to understand or resolve.
    I am using the CS5 Update Record Server Bahavior to update the user table for a website, but instead if updating the record, it deletes the entire record.
    I look at the SQL and it is definately an Update, so I dont see how it deleting the entire record.
    What I did:
    Passed in record ID through querystring to get the filtered recordset
    Created update form for dynamic data (the corrent data is filling form from recoredset)
    Created hidden field to hold ID
    Clicked the Update Record Server Behavior and matched form variables to appropriate DB fields
    Set it to go to page to list all users
    Saved page
    Run on local server (php/MySQL)
    When I edit the user  data in the update form and click submit, the record is deleted.
    * I checked the MySQL DB and the entire recored has been deleted
    Anyone have a clue on why this is happening?
    Here's the code from the page:
    <?php require_once('../Connections/localconn.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "updateuser")) {
      $updateSQL = sprintf("UPDATE users SET fname=%s, lname=%s, uname=%s, password=%s, ulevel=%s WHERE id=%s",
                           GetSQLValueString($_POST['fname'], "text"),
                           GetSQLValueString($_POST['lname'], "text"),
                           GetSQLValueString($_POST['uname'], "text"),
                           GetSQLValueString($_POST['pword'], "text"),
                           GetSQLValueString($_POST['ulevel'], "int"),
                           GetSQLValueString($_POST['id'], "int"));
      mysql_select_db($database_localconn, $localconn);
      $Result1 = mysql_query($updateSQL, $localconn) or die(mysql_error());
      $updateGoTo = "users.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_Recordset_users = "-1";
    if (isset($_GET['id'])) {
      $colname_Recordset_users = $_GET['id'];
    mysql_select_db($database_localconn, $localconn);
    $query_Recordset_users = sprintf("SELECT * FROM users WHERE id = %s", GetSQLValueString($colname_Recordset_users, "int"));
    $Recordset_users = mysql_query($query_Recordset_users, $localconn) or die(mysql_error());
    $row_Recordset_users = mysql_fetch_assoc($Recordset_users);
    $totalRows_Recordset_users = mysql_num_rows($Recordset_users);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Title</title>
    <meta http-equiv="Content-Language" content="English" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">
    <link rel="stylesheet" type="text/css" href="style.css" media="screen" />
    </head>
    <body>
    <div id="wrap">
    <div id="top"></div>
    <div id="content">
    <div class="header">
    <h1><a href="#">FENA </a></h1>
    <h2>Content Management System (CMS)</h2>
    </div>
    <div class="breadcrumbs">
    <a href="#">Home</a> &middot; Edit User
    </div>
    <div class="middle">
    <h2>Edit User - <?php echo $row_Recordset_users['lname']; ?>, <?php echo $row_Recordset_users['fname']; ?></h2>
    <form method="POST" action="<?php echo $editFormAction; ?>" name="updateuser"> 
    <table>
    <tr>
         <td>Last Name</td>
            <td><input name="lname" type="text" value="<?php echo $row_Recordset_users['lname']; ?>" /></td>
        </tr>
        <tr>
         <td>First Name</td>
            <td><input name="fname" type="text" value="<?php echo $row_Recordset_users['fname']; ?>" /></td>
        </tr>
        <tr>
         <td>Username</td>
            <td><input name="uname" type="text" value="<?php echo $row_Recordset_users['uname']; ?>" /></td>
        </tr>
        <tr>
         <td>Password</td>
            <td><input name="pword" type="text" value="<?php echo $row_Recordset_users['password']; ?>" /></td>
        </tr>
        <tr>
         <td>User Level</td>
            <td>
             <select name="ulevel">
                 <option value="<?php echo $row_Recordset_users['ulevel']; ?>"><?php echo $row_Recordset_users['ulevel']; ?></option>
                    <option value="1">Admin</option>
                    <option value="2">Editor</option>
                </select>
            </td>
        </tr>
        <tr>
         <td colspan="2" align="right"><input name="id" type="hidden" value="<?php echo $row_Recordset_users['id']; ?>" /><input name="submit" type="submit" value="Submit" /></td>
        </tr>
    </table>
    <input type="hidden" name="MM_update" value="updateuser" />
    </form>
    </div>
    <div class="right">
    <h2>Navigation</h2>
    <ul>
    <li><a href="index.php">Home</a></li>
    <li><a href="users.php">Users</a></li>
    <li><a href="users_add.php">Add User</a></li>
    </ul>
    </div>
    <div id="clear"></div>
    </div>
    <div id="bottom"></div>
    </div>
    <div id="footer">
    Developed by Me
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset_users);
    ?>

    Hi Paul,
    I am actually try to a create a submit a process and have it to update the DB.
    Thanks,
    Han

  • Update record form

    Hello all,
    I've got an update record form on one of my pages (it is a
    php site). I followed the tutorial in dreamweaver 8, but it does
    not work like I want it to work.
    I am hoping that when a user logs into the site, and they
    want to update their information, they will be redirected to a page
    that has a form. This form has all the text fields blank, except
    for thier username (which is not editable). The rest of the fields,
    they can enter as many as they want. The fields that are left blank
    will have no effect on the record in the database.
    How it is now, I've got to have them retype in their username
    and password, then the form fields populate, but if they make a
    mistake and erase a field, then that field is deleted in the
    database.
    Is there a tutorial that I have not found yet that I can
    learn how to do this?
    Thank you

    Hi,
    If you dont want the Dreamweaver to update your dependent files, Just go to the "Edit -> Preferences" menu, In the preferences dialog click on the "Site" category which can be seen in the left panel, and there you might have some options for setting the "Dependent files" preferences, just check out the "Get/Check Out" and "Prompt on Put/Check" options.
    I hope this might fix your issue.
    HTH

Maybe you are looking for

  • Org.apache.xml.serialize.XMLSerializer

    Hi, I am using Eclipse for Weblogic 10.3.4 (OEPE1111). I imported a j2ee project. It doesn't include xercesImpl jar. Where should I add them in? On the Java Build Path screen, there are so many options. Thanks!

  • Can i charge my C3-00 Battery with AC-8 charger?

    Hi Can i charge my c3-00 Battery with AC-8 Charger? because charging it with AC-3 takes about 3 and half hour! and as we know the battery which supplied with C3-00 is same as 5800 and n900

  • Shooting a school play, camera advice

    Hi, We have been asked by the school if we could shoot this years Christmas play. We thought the best way was to setup 3 fixed cameras covering different angles of the stage and use Final Cut Pro to cut the footage together. We would ideally like to

  • Will I be able to access my music and documents that are in icloud when I am visiting Europe with my computer?

    We are planning to spend four months in Spain with excurions to other Europen locations.  I will have my mac mini (Lion) with me in Spain and ipad with me on the road. I know I need wifi access.  Will I have full access to my music, all of which is i

  • D101 Error after moving a GW Resource

    Hi, I've seen a few posts on D101 errors, but none seem to fit my circumstances. I have a resource "Dept Calendar" owned by USERA on POA. Everything works fine. Other users can proxy to the calendar with no problems - everyone is happy. USERA then le