Check for end of .FLV

OK so I have an .FLV playing in a div container. After and
only after the viewer watches the complete .FLV I want a feedback
form to come up. Now, should I use flash for this or html? What
actionscript would I use for this ? Event.complete if thats even a
valid command. Please help, thank you.

It would really depend on how you are getting the video into
you .swf: if it's embeded or you're creating your own video
instance. Assuming you're creating your own instance of the video
player, you could set and event listening for a net status event
like so:
private function onNetStatus(evt:NetStatusEvent):void
if(evt.info.code == "NetStream.Play.Start")
isPlaying = true;
}else if (evt.info.code == "NetStream.Play.Stop") {
isPlaying = false;
trace("video stopped");
Then if you're watching the isPlaying variable, if it's shows
up as false you know the video isn't playing anymore and you could
then call another function.

Similar Messages

  • NetStream.onStatus handler for end of FLV

    Hey,
    Basically I want to cue an event when an FLV playing through
    a netConnection/netStream is finished - if anybody has any tips
    it'd be much appreciated.
    I could put a CuePoint on the last frame of each FLV and use
    an onCuePoint Event Handler - but there must be an easier way?
    I'm assuming the 'NetStream.Play.Stop' Code Property won't do
    the job because then simply pausing the Video would cause the event
    to trigger, whereas I only want to trigger it at the very end of
    the stream.
    Is there a way of coding 'When my_ns.time == the last second
    of the stream then perform function X'?
    Thanks in advance for any assistance,
    Justin.

    It would really depend on how you are getting the video into
    you .swf: if it's embeded or you're creating your own video
    instance. Assuming you're creating your own instance of the video
    player, you could set and event listening for a net status event
    like so:
    private function onNetStatus(evt:NetStatusEvent):void
    if(evt.info.code == "NetStream.Play.Start")
    isPlaying = true;
    }else if (evt.info.code == "NetStream.Play.Stop") {
    isPlaying = false;
    trace("video stopped");
    Then if you're watching the isPlaying variable, if it's shows
    up as false you know the video isn't playing anymore and you could
    then call another function.

  • Acrobat 7 - Check for updates ends at 7.1.0

    While updting some older copies of Acrobat I noticed that the Check for updates now... feature in Acrobat 7 only shows updates available up to 7.1.0. Three newer udates are available, 7.1.1, 7.1.3 and 7.1.4. Since I see this behavior on multiple machines I assume this is standard behavior for Acrobat 7 Update Manager per Adobe. If that's the case this kinda defeats the purpose of having a check for updates comand in the app if users have to go manually download the updates anyway. Can anyone shed any light on what's up?

    Acrobat 8 was introduced at the time of the 7.1.0 Update.
    There were no added features were in the updates after.
    And most of the updates that followed were bug fixes and security updates.
    the very most recent ones were security Updates.
    Most "Reputable" Software companies will do Security Fixes on software for many years until they feel that no one is or should be using that product.
    Its just recent that Apple has stopped supporting OSX.4.11. (Now I've got to find X.5 to put on the slow computer myself.)

  • How can i check for posted but not yet commited changes in a form

    Dears
    I make changes programmatically in a form then i post it using (Post built in).
    If the user exits the form, i make check for any changes in the form to commit it using the system variable :system.form_status
    Unfortunately the value of this system variable is 'Query' not 'Changed' because of using the post built in.
    Is ther another system variable ( or any another way ) that check for posted but not yet commited changes in the form ?
    Thanks a lot
    Mostafa Abolaynain

    I had faced similar situation. Using of package variable which identifies, what is the user's latest action.
    This is just a workaround.
    Capture what the user has performed into a variable say, PKG_VAR.ACTION,
    This will be assigned values like List L, and Create C, Update U and Saved S.
    If commit is executed,assing the status S to the variable.
    So while closing,
    IF :system.form_status = 'CHANGED' or PKG_VAR.ACTION in ('C','U') THEN     
    -- validate the data, n perform commit.
    else
    -- just close the form.
    end if;
    Regards
    Deepz : )

  • Failing all pre-requisite checks for 11.2.0.2.0 RAC on HP-UX Itanium 64

    Hi Guys,
    For Typical OR Advanced Grid Installation (GUI), all pre-requisites are failing on both nodes, like memory, swap, node reachability, groups, user & lot more.....
    But when I try to check Pre-requisite from command line, everything seems to be ok.
    This is what the output...
    $ ./runcluvfy.sh stage -pre crsinst -n sph1erp,sph2erp -fixup -verbose
    Performing pre-checks for cluster services setup
    Checking node reachability...
    Check: Node reachability from node "sph1erp"
    Destination Node Reachable?
    sph1erp yes
    sph2erp yes
    Result: Node reachability check passed from node "sph1erp"
    Checking user equivalence...
    Check: User equivalence for user "oracle"
    Node Name Comment
    sph2erp passed
    sph1erp passed
    Result: User equivalence check passed for user "oracle"
    Checking node connectivity...
    Checking hosts config file...
    Node Name Status Comment
    sph2erp passed
    sph1erp passed
    Verification of the hosts config file successful
    Interface information for node "sph2erp"
    Name IP Address Subnet Gateway Def. Gateway HW Address MTU
    lan2 10.10.16.51 10.10.16.48 10.10.16.51 10.10.1.12 78:AC:C0:8A:07:76 1500
    lan900 10.10.1.174 10.10.0.0 10.10.1.174 10.10.1.12 78:AC:C0:8A:07:6E 1500
    Interface information for node "sph1erp"
    Name IP Address Subnet Gateway Def. Gateway HW Address MTU
    lan2 10.10.16.50 10.10.16.48 10.10.16.50 10.10.1.12 3C:4A:92:48:71:BE 1500
    lan900 10.10.1.173 10.10.0.0 10.10.1.173 10.10.1.12 3C:4A:92:48:71:B6 1500
    Check: Node connectivity of subnet "10.10.16.48"
    Source Destination Connected?
    sph2erp[10.10.16.51] sph1erp[10.10.16.50] yes
    Result: Node connectivity passed for subnet "10.10.16.48" with node(s) sph2erp,sph1erp
    Check: TCP connectivity of subnet "10.10.16.48"
    Source Destination Connected?
    sph1erp:10.10.16.50 sph2erp:10.10.16.51 passed
    Result: TCP connectivity check passed for subnet "10.10.16.48"
    Check: Node connectivity of subnet "10.10.0.0"
    Source Destination Connected?
    sph2erp[10.10.1.174] sph1erp[10.10.1.173] yes
    Result: Node connectivity passed for subnet "10.10.0.0" with node(s) sph2erp,sph1erp
    Check: TCP connectivity of subnet "10.10.0.0"
    Source Destination Connected?
    sph1erp:10.10.1.173 sph2erp:10.10.1.174 passed
    Result: TCP connectivity check passed for subnet "10.10.0.0"
    Interfaces found on subnet "10.10.0.0" that are likely candidates for VIP are:
    sph2erp lan900:10.10.1.174
    sph1erp lan900:10.10.1.173
    Interfaces found on subnet "10.10.16.48" that are likely candidates for a private interconnect are:
    sph2erp lan2:10.10.16.51
    sph1erp lan2:10.10.16.50
    Result: Node connectivity check passed
    Check: Total memory
    Node Name Available Required Comment
    sph2erp 63.9GB (6.7004024E7KB) 4GB (4194304.0KB) passed
    sph1erp 63.9GB (6.7004024E7KB) 4GB (4194304.0KB) passed
    Result: Total memory check passed
    Check: Available memory
    Node Name Available Required Comment
    sph2erp 53.3556GB (5.5947372E7KB) 50MB (51200.0KB) passed
    sph1erp 52.2323GB (5.47695E7KB) 50MB (51200.0KB) passed
    Result: Available memory check passed
    Check: Swap space
    Node Name Available Required Comment
    sph2erp 188.7773GB (1.97947352E8KB) 4GB (4194304.0KB) passed
    sph1erp 188.7773GB (1.97947352E8KB) 4GB (4194304.0KB) passed
    Result: Swap space check passed
    Check: Free disk space for "sph2erp:/var/tmp/"
    Path Node Name Mount point Available Required Comment
    /var/tmp/ sph2erp /var 13.8074GB 1GB passed
    Result: Free disk space check passed for "sph2erp:/var/tmp/"
    Check: Free disk space for "sph1erp:/var/tmp/"
    Path Node Name Mount point Available Required Comment
    /var/tmp/ sph1erp /var 13.8158GB 1GB passed
    Result: Free disk space check passed for "sph1erp:/var/tmp/"
    Check: User existence for "oracle"
    Node Name Status Comment
    sph2erp exists(199) passed
    sph1erp exists(199) passed
    Checking for multiple users with UID value 199
    Result: Check for multiple users with UID value 199 passed
    Result: User existence check passed for "oracle"
    Check: Group existence for "oinstall"
    Node Name Status Comment
    sph2erp exists passed
    sph1erp exists passed
    Result: Group existence check passed for "oinstall"
    Check: Group existence for "dba"
    Node Name Status Comment
    sph2erp exists passed
    sph1erp exists passed
    Result: Group existence check passed for "dba"
    Check: Membership of user "oracle" in group "oinstall" [as Primary]
    Node Name User Exists Group Exists User in Group Primary Comment
    sph2erp yes yes yes yes passed
    sph1erp yes yes yes yes passed
    Result: Membership check for user "oracle" in group "oinstall" [as Primary] passed
    Check: Membership of user "oracle" in group "dba"
    Node Name User Exists Group Exists User in Group Comment
    sph2erp yes yes yes passed
    sph1erp yes yes yes passed
    Result: Membership check for user "oracle" in group "dba" passed
    Check: Run level
    Node Name run level Required Comment
    sph2erp 3 3 passed
    sph1erp 3 3 passed
    Result: Run level check passed
    Check: Hard limits for "maximum open file descriptors"
    Node Name Type Available Required Comment
    sph2erp hard 63488 63488 passed
    sph1erp hard 63488 63488 passed
    Result: Hard limits check passed for "maximum open file descriptors"
    Check: Soft limits for "maximum open file descriptors"
    Node Name Type Available Required Comment
    sph2erp soft 1024 1024 passed
    sph1erp soft 63488 1024 passed
    Result: Soft limits check passed for "maximum open file descriptors"
    Check: Hard limits for "maximum user processes"
    Node Name Type Available Required Comment
    sph2erp hard 3687 3686 passed
    sph1erp hard 3687 3686 passed
    Result: Hard limits check passed for "maximum user processes"
    Check: Soft limits for "maximum user processes"
    Node Name Type Available Required Comment
    sph2erp soft 3687 2047 passed
    sph1erp soft 3687 2047 passed
    Result: Soft limits check passed for "maximum user processes"
    Check: System architecture
    Node Name Available Required Comment
    sph2erp ia64 ia64 passed
    sph1erp ia64 ia64 passed
    Result: System architecture check passed
    Check: Kernel version
    Node Name Available Required Comment
    sph2erp HP-UX B.11.31 B.11.31 passed
    sph1erp HP-UX B.11.31 B.11.31 passed
    Result: Kernel version check passed
    Check: Kernel parameter for "ksi_alloc_max"
    Node Name Configured Required Comment
    sph2erp 32768 32768 passed
    sph1erp 32768 32768 passed
    Result: Kernel parameter check passed for "ksi_alloc_max"
    Check: Kernel parameter for "executable_stack"
    Node Name Configured Required Comment
    sph2erp 0 0 passed
    sph1erp 0 0 passed
    Result: Kernel parameter check passed for "executable_stack"
    Check: Kernel parameter for "max_thread_proc"
    Node Name Configured Required Comment
    sph2erp 1024 1024 passed
    sph1erp 1024 1024 passed
    Result: Kernel parameter check passed for "max_thread_proc"
    Check: Kernel parameter for "maxdsiz"
    Node Name Configured Required Comment
    sph2erp 1073741824 1073741824 passed
    sph1erp 1073741824 1073741824 passed
    Result: Kernel parameter check passed for "maxdsiz"
    Check: Kernel parameter for "maxdsiz_64bit"
    Node Name Configured Required Comment
    sph2erp 2147483648 2147483648 passed
    sph1erp 2147483648 2147483648 passed
    Result: Kernel parameter check passed for "maxdsiz_64bit"
    Check: Kernel parameter for "maxssiz"
    Node Name Configured Required Comment
    sph2erp 134217728 134217728 passed
    sph1erp 134217728 134217728 passed
    Result: Kernel parameter check passed for "maxssiz"
    Check: Kernel parameter for "maxssiz_64bit"
    Node Name Configured Required Comment
    sph2erp 1073741824 1073741824 passed
    sph1erp 1073741824 1073741824 passed
    Result: Kernel parameter check passed for "maxssiz_64bit"
    Check: Kernel parameter for "maxuprc"
    Node Name Configured Required Comment
    sph2erp 3686 3686 passed
    sph1erp 3686 3686 passed
    Result: Kernel parameter check passed for "maxuprc"
    Check: Kernel parameter for "msgmni"
    Node Name Configured Required Comment
    sph2erp 4096 4096 passed
    sph1erp 4096 4096 passed
    Result: Kernel parameter check passed for "msgmni"
    Check: Kernel parameter for "msgtql"
    Node Name Configured Required Comment
    sph2erp 4096 4096 passed
    sph1erp 4096 4096 passed
    Result: Kernel parameter check passed for "msgtql"
    Check: Kernel parameter for "ncsize"
    Node Name Configured Required Comment
    sph2erp 35840 35840 passed
    sph1erp 35840 35840 passed
    Result: Kernel parameter check passed for "ncsize"
    Check: Kernel parameter for "shmmax"
    Node Name Configured Required Comment
    sph2erp 1073741824 1073741824 passed
    sph1erp 1073741824 1073741824 passed
    Result: Kernel parameter check passed for "shmmax"
    Check: Kernel parameter for "shmmni"
    Node Name Configured Required Comment
    sph2erp 4096 4096 passed
    sph1erp 4096 4096 passed
    Result: Kernel parameter check passed for "shmmni"
    Check: Kernel parameter for "shmseg"
    Node Name Configured Required Comment
    sph2erp 512 512 passed
    sph1erp 512 512 passed
    Result: Kernel parameter check passed for "shmseg"
    Check: Kernel parameter for "tcp_smallest_anon_port"
    Node Name Configured Required Comment
    sph2erp 9000 9000 passed
    sph1erp 9000 9000 passed
    Result: Kernel parameter check passed for "tcp_smallest_anon_port"
    Check: Kernel parameter for "tcp_largest_anon_port"
    Node Name Configured Required Comment
    sph2erp 65500 65500 passed
    sph1erp 65500 65500 passed
    Result: Kernel parameter check passed for "tcp_largest_anon_port"
    Check: Kernel parameter for "udp_smallest_anon_port"
    Node Name Configured Required Comment
    sph2erp 9000 9000 passed
    sph1erp 9000 9000 passed
    Result: Kernel parameter check passed for "udp_smallest_anon_port"
    Check: Kernel parameter for "udp_largest_anon_port"
    Node Name Configured Required Comment
    sph2erp 65500 65500 passed
    sph1erp 65500 65500 passed
    Result: Kernel parameter check passed for "udp_largest_anon_port"
    Check: Package existence for "OS-Core-B.11.31( ia64)"
    Node Name Available Required Comment
    sph2erp OS-Core-B.11.31-0 OS-Core-B.11.31( ia64) passed
    sph1erp OS-Core-B.11.31-0 OS-Core-B.11.31( ia64) passed
    Result: Package existence check passed for "OS-Core-B.11.31( ia64)"
    Check: Operating system patch for "Patch PHKL_38938"
    Node Name Applied Required Comment
    sph2erp Patch PHKL_39646 Patch PHKL_38938 passed
    sph1erp Patch PHKL_39646 Patch PHKL_38938 passed
    Result: Operating system patch check passed for "Patch PHKL_38938"
    Check: Operating system patch for "Patch PHKL_39351"
    Node Name Applied Required Comment
    sph2erp Patch PHKL_40207 Patch PHKL_39351 passed
    sph1erp Patch PHKL_40207 Patch PHKL_39351 passed
    Result: Operating system patch check passed for "Patch PHKL_39351"
    Check: Operating system patch for "Patch PHSS_36354"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40546 Patch PHSS_36354 passed
    sph1erp Patch PHSS_40546 Patch PHSS_36354 passed
    Result: Operating system patch check passed for "Patch PHSS_36354"
    Check: Operating system patch for "Patch PHSS_37042"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_37042 Patch PHSS_37042 passed
    sph1erp Patch PHSS_37042 Patch PHSS_37042 passed
    Result: Operating system patch check passed for "Patch PHSS_37042"
    Check: Operating system patch for "Patch PHSS_37959"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40804 Patch PHSS_37959 passed
    sph1erp Patch PHSS_40804 Patch PHSS_37959 passed
    Result: Operating system patch check passed for "Patch PHSS_37959"
    Check: Operating system patch for "Patch PHSS_39094"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40538 Patch PHSS_39094 passed
    sph1erp Patch PHSS_40538 Patch PHSS_39094 passed
    Result: Operating system patch check passed for "Patch PHSS_39094"
    Check: Operating system patch for "Patch PHSS_39100"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40540 Patch PHSS_39100 passed
    sph1erp Patch PHSS_40540 Patch PHSS_39100 passed
    Result: Operating system patch check passed for "Patch PHSS_39100"
    Check: Operating system patch for "Patch PHSS_39102"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_41496 Patch PHSS_39102 passed
    sph1erp Patch PHSS_41496 Patch PHSS_39102 passed
    Result: Operating system patch check passed for "Patch PHSS_39102"
    Check: Operating system patch for "Patch PHSS_38141"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_38141 Patch PHSS_38141 passed
    sph1erp Patch PHSS_38141 Patch PHSS_38141 passed
    Result: Operating system patch check passed for "Patch PHSS_38141"
    Check: Operating system patch for "Patch PHCO_40381"
    Node Name Applied Required Comment
    sph2erp Patch PHCO_40381 Patch PHCO_40381 passed
    sph1erp Patch PHCO_40381 Patch PHCO_40381 passed
    Result: Operating system patch check passed for "Patch PHCO_40381"
    Check: Operating system patch for "Patch PHKL_38038"
    Node Name Applied Required Comment
    sph2erp Patch PHKL_41005 Patch PHKL_38038 passed
    sph1erp Patch PHKL_41005 Patch PHKL_38038 passed
    Result: Operating system patch check passed for "Patch PHKL_38038"
    Checking for multiple users with UID value 0
    Result: Check for multiple users with UID value 0 passed
    Check: Current group ID
    Result: Current group ID check passed
    Starting Clock synchronization checks using Network Time Protocol(NTP)...
    NTP Configuration file check started...
    Network Time Protocol(NTP) configuration file not found on any of the nodes. Oracle Cluster Time Synchronization Service(CTSS) can be used instead of NTP for time synchronization on the cluster nodes
    No NTP Daemons or Services were found to be running
    Result: Clock synchronization check using Network Time Protocol(NTP) passed
    Checking Core file name pattern consistency...
    Core file name pattern consistency check passed.
    Checking to make sure user "oracle" is not in "root" group
    Node Name Status Comment
    sph2erp does not exist passed
    sph1erp does not exist passed
    Result: User "oracle" is not part of "root" group. Check passed
    Check default user file creation mask
    Node Name Available Required Comment
    sph2erp 022 0022 passed
    sph1erp 022 0022 passed
    Result: Default user file creation mask check passed
    Checking consistency of file "/etc/resolv.conf" across nodes
    Node Name Status
    sph2erp passed
    sph1erp passed
    The DNS response time for an unreachable node is within acceptable limit on all nodes
    File "/etc/resolv.conf" is consistent across nodes
    Check: Time zone consistency
    Result: Time zone consistency check passed
    Checking settings of device file "/dev/async"
    Node Name Available Comment
    sph2erp yes failed (incorrect setting for minor number.)
    sph1erp yes failed (incorrect setting for minor number.)
    Result: Check for settings of device file "/dev/async" failed.
    Starting check for The SSH LoginGraceTime setting ...
    WARNING:
    PRVE-0038 : The SSH LoginGraceTime setting on node "sph2erp" may result in users being disconnected before login is completed
    PRVE-0038 : The SSH LoginGraceTime setting on node "sph1erp" may result in users being disconnected before login is completed
    Check for The SSH LoginGraceTime setting passed
    Fixup information has been generated for following node(s):
    sph2erp,sph1erp
    Please run the following script on each node as "root" user to execute the fixups:
    '/tmp/CVU_11.2.0.2.0_oracle/runfixup.sh'
    Pre-check for cluster services setup was unsuccessful on all the nodes.
    What could be the issue ????
    Any help would be appreciated...
    Regards,
    Manish

    Started with Grid Installation. Copying Software to remote node & linking libraries were successfully without any issue (upto 76%). But got issue while executing root.sh on Node1
    sph1erp:/oracle/11.2.0/grid #sh root.sh
    Running Oracle 11g root script...
    The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /oracle/11.2.0/grid
    Enter the full pathname of the local bin directory: [usr/local/bin]:
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root script.
    Now product-specific root actions will be performed.
    Using configuration parameter file: /oracle/11.2.0/grid/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'sys'..
    Operation successful.
    OLR initialization - successful
    root wallet
    root wallet cert
    root cert export
    peer wallet
    profile reader wallet
    pa wallet
    peer wallet keys
    pa wallet keys
    peer cert request
    pa cert request
    peer cert
    pa cert
    peer root cert TP
    profile reader root cert TP
    pa root cert TP
    peer pa cert TP
    pa peer cert TP
    profile reader pa cert TP
    profile reader peer cert TP
    peer user cert
    pa user cert
    Adding daemon to inittab
    CRS-2672: Attempting to start 'ora.mdnsd' on 'sph1erp'
    CRS-2676: Start of 'ora.mdnsd' on 'sph1erp' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'sph1erp'
    CRS-2676: Start of 'ora.gpnpd' on 'sph1erp' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'sph1erp'
    CRS-2672: Attempting to start 'ora.gipcd' on 'sph1erp'
    CRS-2676: Start of 'ora.gipcd' on 'sph1erp' succeeded
    CRS-2676: Start of 'ora.cssdmonitor' on 'sph1erp' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'sph1erp'
    CRS-2672: Attempting to start 'ora.diskmon' on 'sph1erp'
    CRS-2676: Start of 'ora.diskmon' on 'sph1erp' succeeded
    CRS-2676: Start of 'ora.cssd' on 'sph1erp' succeeded
    ASM created and started successfully.
    Disk Group OCRVOTE created successfully.
    clscfg: -install mode specified
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'sys'..
    Operation successful.
    CRS-4256: Updating the profile
    Successful addition of voting disk ab847ed2b4f04f2dbfb875226d2bb194.
    Successful addition of voting disk 85c05a5b30384f8dbff48cc069de7a7c.
    Successful addition of voting disk 649196fbdd614f9cbf26a9a0e6670a6e.
    Successful addition of voting disk 8815dfcee2e64f64bf00b9c76626ab41.
    Successful addition of voting disk 8ce55fe5534f4f77bfa9f54187592707.
    Successfully replaced voting disk group with +OCRVOTE.
    CRS-4256: Updating the profile
    CRS-4266: Voting file(s) successfully replaced
    ## STATE File Universal Id File Name Disk group
    1. ONLINE ab847ed2b4f04f2dbfb875226d2bb194 (/dev/oracle/ocrvote1) [OCRVOTE]
    2. ONLINE 85c05a5b30384f8dbff48cc069de7a7c (/dev/oracle/ocrvote2) [OCRVOTE]
    3. ONLINE 649196fbdd614f9cbf26a9a0e6670a6e (/dev/oracle/ocrvote3) [OCRVOTE]
    4. ONLINE 8815dfcee2e64f64bf00b9c76626ab41 (/dev/oracle/ocrvote4) [OCRVOTE]
    5. ONLINE 8ce55fe5534f4f77bfa9f54187592707 (/dev/oracle/ocrvote5) [OCRVOTE]
    Located 5 voting disk(s).
    Start of resource "ora.cluster_interconnect.haip" failed
    CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'sph1erp'
    CRS-5017: The resource action "ora.cluster_interconnect.haip start" encountered the following error:
    Start action for HAIP aborted
    CRS-2674: Start of 'ora.cluster_interconnect.haip' on 'sph1erp' failed
    CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'sph1erp'
    CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'sph1erp' succeeded
    CRS-4000: Command Start failed, or completed with errors.
    Failed to start Oracle Clusterware stack
    Failed to start High Availability IP at /oracle/11.2.0/grid/crs/install/crsconfig_lib.pm line 1046.
    /oracle/11.2.0/grid/perl/bin/perl -I/oracle/11.2.0/grid/perl/lib -I/oracle/11.2.0/grid/crs/install /oracle/11.2.0/grid/crs/install/rootcrs.pl execution failed
    sph1erp:/oracle/11.2.0/grid #
    Last few lines from CRS Log for node 1, where error came
    [ctssd(6467)]CRS-2401:The Cluster Time Synchronization Service started on host sph1erp.
    2011-02-25 23:04:16.491
    [oracle/11.2.0/grid/bin/orarootagent.bin(6423)]CRS-5818:Aborted command 'start for resource: ora.cluster_interconnect.haip 1 1' for resource 'ora.cluster_int
    erconnect.haip'. Details at (:CRSAGF00113:) {0:0:178} in */oracle/11.2.0/grid/log/sph1erp/agent/ohasd/orarootagent_root/orarootagent_root.log.*
    2011-02-25 23:04:20.521
    [ohasd(5513)]CRS-2757:Command 'Start' timed out waiting for response from the resource 'ora.cluster_interconnect.haip'. Details at (:CRSPE00111:) {0:0:178} in
    */oracle/11.2.0/grid/log/sph1erp/ohasd/ohasd.log.*
    Few lines from */oracle/11.2.0/grid/log/sph1erp/agent/ohasd/orarootagent_root/orarootagent_root.log.*
    =====================================================================================================
    2011-02-25 23:04:16.823: [ USRTHRD][16] {0:0:178} Starting Probe for ip 169.254.74.54
    2011-02-25 23:04:16.823: [ USRTHRD][16] {0:0:178} Transitioning to Probe State
    2011-02-25 23:04:17.177: [ USRTHRD][15] {0:0:178} [NetHAMain] thread stopping
    2011-02-25 23:04:17.177: [ USRTHRD][15] {0:0:178} Thread:[NetHAMain]isRunning is reset to false here
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} Thread:[NetHAMain]stop }
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} thread cleaning up
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} pausing thread
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} posting thread
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop {
    2011-02-25 23:04:17.645: [ USRTHRD][16] {0:0:178} [NetHAWork] thread stopping
    2011-02-25 23:04:17.645: [ USRTHRD][16] {0:0:178} Thread:[NetHAWork]isRunning is reset to false here
    2011-02-25 23:04:17.645: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop }
    2011-02-25 23:04:17.645: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop {
    2011-02-25 23:04:17.645: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop }
    2011-02-25 23:04:17.891: [ora.cluster_interconnect.haip][12] {0:0:178} [start] Start of HAIP aborted
    2011-02-25 23:04:17.892: [   AGENT][12] {0:0:178} UserErrorException: Locale is
    2011-02-25 23:04:17.893: [ora.cluster_interconnect.haip][12] {0:0:178} [start] clsnUtils::error Exception type=2 string=
    CRS-5017: The resource action "ora.cluster_interconnect.haip start" encountered the following error:
    Start action for HAIP aborted
    2011-02-25 23:04:17.893: [    AGFW][12] {0:0:178} sending status msg [CRS-5017: The resource action "ora.cluster_interconnect.haip start" encountered the foll
    owing error:
    Start action for HAIP aborted
    ] for start for resource: ora.cluster_interconnect.haip 1 1
    2011-02-25 23:04:17.893: [ora.cluster_interconnect.haip][12] {0:0:178} [start] clsn_agent::start }
    2011-02-25 23:04:17.894: [    AGFW][10] {0:0:178} Agent sending reply for: RESOURCE_START[ora.cluster_interconnect.haip 1 1] ID 4098:661
    2011-02-25 23:04:18.552: [ora.diskmon][12] {0:0:154} [check] DiskmonAgent::check {
    2011-02-25 23:04:18.552: [ora.diskmon][12] {0:0:154} [check] DiskmonAgent::check } - 0
    2011-02-25 23:04:19.573: [    AGFW][10] {0:0:154} Agent received the message: AGENT_HB[Engine] ID 12293:669
    2011-02-25 23:04:20.510: [ora.cluster_interconnect.haip][18] {0:0:178} [start] got lock
    2011-02-25 23:04:20.511: [ora.cluster_interconnect.haip][18] {0:0:178} [start] tryActionLock }
    2011-02-25 23:04:20.511: [ora.cluster_interconnect.haip][18] {0:0:178} [start] abort }
    2011-02-25 23:04:20.511: [ora.cluster_interconnect.haip][18] {0:0:178} [start] clsn_agent::abort }
    2011-02-25 23:04:20.511: [    AGFW][18] {0:0:178} Command: start for resource: ora.cluster_interconnect.haip 1 1 completed with status: TIMEDOUT
    2011-02-25 23:04:20.512: [ora.cluster_interconnect.haip][8] {0:0:178} [check] NetworkAgent::init enter {
    2011-02-25 23:04:20.513: [ora.cluster_interconnect.haip][8] {0:0:178} [check] NetworkAgent::init exit }
    2011-02-25 23:04:20.517: [    AGFW][10] {0:0:178} Agent sending reply for: RESOURCE_START[ora.cluster_interconnect.haip 1 1] ID 4098:661
    2011-02-25 23:04:20.519: [ USRTHRD][8] {0:0:178} Ocr Context init default level 23886304
    2011-02-25 23:04:20.519: [ default][8]clsvactversion:4: Retrieving Active Version from local storage.
    [   CLWAL][8]clsw_Initialize: OLR initlevel [70000]
    Few lines from */oracle/11.2.0/grid/log/sph1erp/ohasd/ohasd.log.*
    =====================================================================================================
    2011-02-25 23:04:21.627: [UiServer][30] {0:0:180} Done for ctx=6000000002604ce0
    2011-02-25 23:04:21.642: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:26.139: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:26.139: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    2011-02-25 23:04:26.973: [UiServer][31] CS(60000000014b0790)set Properties ( root,60000000012e0260)
    2011-02-25 23:04:26.973: [UiServer][31] SS(6000000001372270)Accepted client connection: saddr =(ADDRESS=(PROTOCOL=ipc)(DEV=92)(KEY=OHASD_UI_SOCKET))daddr = (A
    DDRESS=(PROTOCOL=ipc)(KEY=OHASD_UI_SOCKET))
    2011-02-25 23:04:26.992: [UiServer][30] {0:0:181} processMessage called
    2011-02-25 23:04:26.993: [UiServer][30] {0:0:181} Sending message to PE. ctx= 6000000001b440f0
    2011-02-25 23:04:26.993: [UiServer][30] {0:0:181} Sending command to PE: 67
    2011-02-25 23:04:26.994: [   CRSPE][29] {0:0:181} Processing PE command id=173. Description: [Stat Resource : 600000000135f760]
    2011-02-25 23:04:26.997: [UiServer][30] {0:0:181} Done for ctx=6000000001b440f0
    2011-02-25 23:04:27.012: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:31.135: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:31.135: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    2011-02-25 23:04:32.318: [UiServer][31] CS(60000000014b0790)set Properties ( root,60000000012e0260)
    2011-02-25 23:04:32.318: [UiServer][31] SS(6000000001372270)Accepted client connection: saddr =(ADDRESS=(PROTOCOL=ipc)(DEV=92)(KEY=OHASD_UI_SOCKET))daddr = (A
    DDRESS=(PROTOCOL=ipc)(KEY=OHASD_UI_SOCKET))
    2011-02-25 23:04:32.332: [UiServer][30] {0:0:182} processMessage called
    2011-02-25 23:04:32.333: [UiServer][30] {0:0:182} Sending message to PE. ctx= 6000000001b45ef0
    2011-02-25 23:04:32.333: [UiServer][30] {0:0:182} Sending command to PE: 68
    2011-02-25 23:04:32.334: [   CRSPE][29] {0:0:182} Processing PE command id=174. Description: [Stat Resource : 600000000135f760]
    2011-02-25 23:04:32.338: [UiServer][30] {0:0:182} Done for ctx=6000000001b45ef0
    2011-02-25 23:04:32.352: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:36.155: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:36.155: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    2011-02-25 23:04:37.683: [UiServer][31] CS(60000000014b0790)set Properties ( root,60000000012e0260)
    2011-02-25 23:04:37.683: [UiServer][31] SS(6000000001372270)Accepted client connection: saddr =(ADDRESS=(PROTOCOL=ipc)(DEV=92)(KEY=OHASD_UI_SOCKET))daddr = (A
    DDRESS=(PROTOCOL=ipc)(KEY=OHASD_UI_SOCKET))
    2011-02-25 23:04:37.702: [UiServer][30] {0:0:183} processMessage called
    2011-02-25 23:04:37.703: [UiServer][30] {0:0:183} Sending message to PE. ctx= 6000000002604ce0
    2011-02-25 23:04:37.703: [UiServer][30] {0:0:183} Sending command to PE: 69
    2011-02-25 23:04:37.704: [   CRSPE][29] {0:0:183} Processing PE command id=175. Description: [Stat Resource : 600000000135f760]
    2011-02-25 23:04:37.708: [UiServer][30] {0:0:183} Done for ctx=6000000002604ce0
    2011-02-25 23:04:37.722: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:41.156: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:41.156: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    What could be the issue ????
    Experts Please help me. Doing setup for the PRoduction Env...
    Do response ASAP...... Thanks
    Regards,
    Manish

  • Check for Rentals on Apple TV does not work

    I have rented many movies in the past using Apple TV. I have not had a problem until now, right after I just updated my Apple TV software to the latest software v6.0 (6646.65).
    Last night (9/28) I rented World War Z. Roughly 20 minutes into the movie, I stopped the move by hitting the menu button. This exited me from the movie and back to the movies rentals screen.  I then rented another movie only a few minutes after exiting the first. I had no problem renting the second movie as I did not exit the movie once the streaming started.
    A few hours later I went back to watch the move by selecting the movie.  The rental option was still availabe. By selecting to rent the movie again and then selecting "Rent and watch now", the system told me I had already rented the movie and I should go to Settings->Downloads->Check for Downloads.  This options does NOT exist in the settings menu; however, I found a similar option under iTunes Store->Check for Rentals.
    This "Check for Rentals" option does absolutely nothing - or it doesn't show anything if it is doing something behind the scenes.  It just shows the spinning lines. I waited all night for something to happen. I restarted my router and modem to make sure there was nothing wrong with networking. Again, I had just watched another movie all the way through with no problems. I sent Apple Support an email with my issue and they refunded my $4.99 for the movie rental.
    So, tonight (9/29), I still wanted to watch the movie and I wanted to see if it would work. I went to the movie, selected to rent the movie and it gave me an optionsaying that I had already rented the movie and asking me if I wanted to rent it again. I selected to rent it again.  I was able to watch the movie all the way through with no problem. 
    I ended the movie during the credits by hitting the menu button. I immediately went back to the movie to see if I could continue the movie since I should be able to watch this movie in the next 24 hours.  The same situation happened again. I was told I could not rent the movie again, but to go to Settings->Download->Check for downloads. The "Check for Rentals" is doing the same thing.
    So, my question is how do I fix this or is there even a fix for this situation?  If I can't watch a movie without the fear of exiting the movie for whatever reason and not be able to return to the rented movie, I will not continue to rent movies from Apple TV. I enjoy renting them through Apple TV, but I definitely have multiple options (i.e. XBox Live, PS Network/Amazon, Redbox, etc.).  I really want to understand why this is happening and if it's going to be fixed.
    Thank you for any feedback!

    I have been working on this project for just one day.  Other people have suggested logging out and then logging back in.  I have had sucsess with this sollution today.
    Check this thread as well.
    https://discussions.apple.com/thread/5360214?start=0&tstart=0

  • Page Validation - Function Returning Boolean - Check for NULL

    I have 3 Page Validations which all fire on "When Button Pressed" = "Submit".
    <br><br>
    Number 1 is of type "Item specified is NOT NULL" for "P199_BUSINESS_UNIT1".
    <br>
    Number 2 is of type "Item specified is NOT NULL" for "P199_BUSINESS_UNIT2".
    <br>
    Number 3 is of type "Function Returning Boolean" and has the following code:
    <br><br>
    IF :P199_BUSINESS_UNIT1 IS NULL   AND
       :P199_BUSINESS_UNIT2 IS NULL  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;<br>
    When P199_BUSINESS_UNIT1 is NULL and P199_BUSINESS_UNIT2 is NOT NULL, I get the Error from Validation 1. Perfect.
    <br>
    When P199_BUSINESS_UNIT1 is NOT NULL and P199_BUSINESS_UNIT2 is NULL, I get the Error from Validation 2. Perfect.
    <br>
    When P199_BUSINESS_UNIT1 is NOT NULL and P199_BUSINESS_UNIT2 is NOT NULL, I don't get an Error Message. Perfect.
    <br><br>
    When P199_BUSINESS_UNIT1 is NULL and P199_BUSINESS_UNIT2 is NULL, I get Error Message 1 & 2, <strong>but nothing from 3.</strong>
    <br><br>
    If I change the code to:
    <br><br>
    IF :P199_BUSINESS_UNIT1 = '01'   AND
       :P199_BUSINESS_UNIT2 = '01'  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;<br>
    and change both values to '01', I get the appropriate Error Message.
    <br><br>
    What is going on? Is there some reason I can't check for NULL in a Function Returning Boolean?

    Scott,
    <br><br>
    Instead of adding the Validations, I changed my code from:
    <br><br>
    IF :P199_BUSINESS_UNIT1 IS NULL   AND
       :P199_BUSINESS_UNIT2 IS NULL  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;
    <br>to the following and got the desired results:
    <br><br>
    IF  REPLACE(:P199_BUSINESS_UNIT1,<strong>'%null'</strong> || '%',NULL) IS NULL   AND
        REPLACE(:P199_BUSINESS_UNIT2,<strong>'%null'</strong> || '%',NULL) IS NULL  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;<br>
    Note that I changed the word REPLACE to upper case and the second occurrence of the word NULL to upper case to accentuate the fact that the '%null' is case sensitive, using "%NULL' does not work, it has to be "%null' in lower case.
    <br><br>
    <strong>Thanks for your help.</strong>

  • How do I check for null date entires using custom JScript on a SharePoint NewForm.aspx?

    Hi,
    I have the below JScript:
    /*Function to convert the US Date format to UK date format */
    function parseDate(input) {
    var parts = input.split('/');
    // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])
    return new Date(parts[2], parts[1]-1, parts[0]); // months are 0-based
    /*Function to check if end date is before the start date */
    function checkDates(){
    var sd = parseDate($("input[title='From']").val());
    var ed = parseDate($("input[title='Until']").val());
    if(sd > ed) {
    alert("Please check From and Until Date");
    $("input[value$='Save']").attr('disabled', true); //hide save button
    else
    $("input[value$='Save']").attr('disabled', false); //show save button
    The above works fine for checking sd > ed but I can't seem to check for null's, I have attempted the below which doesn't work:
    /*Function to convert the US Date format to UK date format */
    function parseDate(input) {
    var parts = input.split('/');
    // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])
    return new Date(parts[2], parts[1]-1, parts[0]); // months are 0-based
    /*Function to check if end date is before the start date */
    function checkDates(){
    var sd = parseDate($("input[title='From']").val());
    var ed = parseDate($("input[title='Until']").val());
    if( (sd > ed) || (sd == null) || (ed == Null) ) {
    alert("Please check From and Until Date");
    $("input[value$='Save']").attr('disabled', true); //hide save button
    else
    $("input[value$='Save']").attr('disabled', false); //show save button
    Any help appreciated.

    Hi aspnet-scotland,
    Please post ASP.NET related questions in
    ASP.NET forums where you could receive better responses.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • Checking for null value in arraylist

    Hi
    i have an excel file which i i am reading into an arraylist row by row but not necesarrily that all columns in the row mite be filled. So how do i check for null values in the array list.
    try
                        int cellCount = 0;
                        int emptyRow = 0;
                        HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
                        HSSFSheet sheet = workbook.getSheetAt(0);
                        Iterator rows = sheet.rowIterator(); 
                        myRow = new ArrayList();
                        int r = 1;
                             while (rows.hasNext())
                                  System.out.println("Row # " + r);
                                  HSSFRow row = (HSSFRow) rows.next();
                                  Iterator cells = row.cellIterator();          
                                  cellCount = 0;
                                  boolean isValid = false;
                                  while (cells.hasNext())
                                       HSSFCell cell = (HSSFCell) cells.next();
                                       switch (cell.getCellType())
                                            case HSSFCell.CELL_TYPE_NUMERIC:
                                                 double num = cell.getNumericCellValue();     
                                                 DecimalFormat pattern = new DecimalFormat("###,###,###,###");     
                                                 NumberFormat testNumberFormat = NumberFormat.getNumberInstance();
                                                 String mob = testNumberFormat.format(num);               
                                                 Number n = null;
                                                 try
                                                      n = pattern.parse(mob);
                                                 catch ( ParseException e )
                                                      e.printStackTrace();
                                                 System.out.println(n);
                                                 myRow.add(n);                                             
                                                 //myRow.add(String.valueOf(cell.getNumericCellValue()).trim());
                                                 //System.out.println("numeric: " +cell.getNumericCellValue());
                                                 break;
                                            case HSSFCell.CELL_TYPE_STRING:
                                                 myRow.add(cell.getStringCellValue().trim());
                                                 System.out.println("string: " + cell.getStringCellValue().trim());
                                                 break;
                                            case HSSFCell.CELL_TYPE_BLANK:
                                                 myRow.add(" ");
                                                 System.out.println("add empty:");
                                                 break;
                                       } // end switch
                                       cellCount++;
                                  } // end while                    
                                  r++;
                             }// end while
                   } myRow is the arrayList i am adding the cells of the excel file to. I have checked for blank spaces in my coding so please help with how to check for the black spaces that has been added to my arraylist.
    I have tried checking by looping through the ArrayList and then checking for null values like this
    if(myRow.get(i)!=null)
      // do something
    // i have tried this also
    if(myRow.get(i)!="")
    //do something
    }Edited by: nb123 on Feb 3, 2008 11:23 PM

    From your post I see you are using a 3rd party package to access the Excel SpreadSheets, you will have to look in your API for you 3rd party package and see if there is a method that will identify a blank row, if there is and it does not work, then you have to take that problem up with them. I know this is a pain, but it is the price we pay for 3rd party object use.
    In the mean time, you can make a workaround by checking every column in your row and seeing if it is null, or perhaps even better: check and see if the trimmed value of each cell has a lenth of 0.

  • What is the easiest way to check for internet connection in C#?

    Hi!
    I searched a lot but I didn't get my answer. I'm looking for the easiest way to check for internet connection. Can you help me?
    Thanks a lot.

    Hi Pouya Ebrahimzadeh,
    I suggest you could connect a site to check if it can be opened.
    Public Shared Function CheckForInternetConnection() As Boolean
    Try
    Using client = New WebClient()
    Using stream = client.OpenRead("https://msdn.microsoft.com/")
    Return True
    End Using
    End Using
    Catch
    Return False
    End Try
    End Function
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Check for duplicate record in SQL database before doing INSERT

    Hey guys,
           This is part powershell app doing a SQL insert. BUt my question really relates to the SQL insert. I need to do a check of the database PRIOR to doing the insert to check for duplicate records and if it exists then that record needs
    to be overwritten. I'm not sure how to accomplish this task. My back end is a SQL 2000 Server. I'm piping the data into my insert statement from a powershell FileSystemWatcher app. In my scenario here if the file dumped into a directory starts with I it gets
    written to a SQL database otherwise it gets written to an Access Table. I know silly, but thats the environment im in. haha.
    Any help is appreciated.
    Thanks in Advance
    Rich T.
    #### DEFINE WATCH FOLDERS AND DEFAULT FILE EXTENSION TO WATCH FOR ####
                $cofa_folder = '\\cpsfs001\Data_pvs\TestCofA'
                $bulk_folder = '\\cpsfs001\PVS\Subsidiary\Nolwood\McWood\POD'
                $filter = '*.tif'
                $cofa = New-Object IO.FileSystemWatcher $cofa_folder, $filter -Property @{ IncludeSubdirectories = $false; EnableRaisingEvents= $true; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' }
                $bulk = New-Object IO.FileSystemWatcher $bulk_folder, $filter -Property @{ IncludeSubdirectories = $false; EnableRaisingEvents= $true; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' }
    #### CERTIFICATE OF ANALYSIS AND PACKAGE SHIPPER PROCESSING ####
                Register-ObjectEvent $cofa Created -SourceIdentifier COFA/PACKAGE -Action {
           $name = $Event.SourceEventArgs.Name
           $changeType = $Event.SourceEventArgs.ChangeType
           $timeStamp = $Event.TimeGenerated
    #### CERTIFICATE OF ANALYSIS PROCESS BEGINS ####
                $test=$name.StartsWith("I")
         if ($test -eq $true) {
                $pos = $name.IndexOf(".")
           $left=$name.substring(0,$pos)
           $pos = $left.IndexOf("L")
           $tempItem=$left.substring(0,$pos)
           $lot = $left.Substring($pos + 1)
           $item=$tempItem.Substring(1)
                Write-Host "in_item_key $item in_lot_key $lot imgfilename $name in_cofa_crtdt $timestamp"  -fore green
                Out-File -FilePath c:\OutputLogs\CofA.csv -Append -InputObject "in_item_key $item in_lot_key $lot imgfilename $name in_cofa_crtdt $timestamp"
                start-sleep -s 5
                $conn = New-Object System.Data.SqlClient.SqlConnection("Data Source=PVSNTDB33; Initial Catalog=adagecopy_daily; Integrated Security=TRUE")
                $conn.Open()
                $insert_stmt = "INSERT INTO in_cofa_pvs (in_item_key, in_lot_key, imgfileName, in_cofa_crtdt) VALUES ('$item','$lot','$name','$timestamp')"
                $cmd = $conn.CreateCommand()
                $cmd.CommandText = $insert_stmt
                $cmd.ExecuteNonQuery()
                $conn.Close()
    #### PACKAGE SHIPPER PROCESS BEGINS ####
              elseif ($test -eq $false) {
                $pos = $name.IndexOf(".")
           $left=$name.substring(0,$pos)
           $pos = $left.IndexOf("O")
           $tempItem=$left.substring(0,$pos)
           $order = $left.Substring($pos + 1)
           $shipid=$tempItem.Substring(1)
                Write-Host "so_hdr_key $order so_ship_key $shipid imgfilename $name in_cofa_crtdt $timestamp"  -fore green
                Out-File -FilePath c:\OutputLogs\PackageShipper.csv -Append -InputObject "so_hdr_key $order so_ship_key $shipid imgfilename $name in_cofa_crtdt $timestamp"
    Rich Thompson

    Hi
    Since SQL Server 2000 has been out of support, I recommend you to upgrade the SQL Server 2000 to a higher version, such as SQL Server 2005 or SQL Server 2008.
    According to your description, you can try the following methods to check duplicate record in SQL Server.
    1. You can use
    RAISERROR to check the duplicate record, if exists then RAISERROR unless insert accordingly, code block is given below:
    IF EXISTS (SELECT 1 FROM TableName AS t
    WHERE t.Column1 = @ Column1
    AND t.Column2 = @ Column2)
    BEGIN
    RAISERROR(‘Duplicate records’,18,1)
    END
    ELSE
    BEGIN
    INSERT INTO TableName (Column1, Column2, Column3)
    SELECT @ Column1, @ Column2, @ Column3
    END
    2. Also you can create UNIQUE INDEX or UNIQUE CONSTRAINT on the column of a table, when you try to INSERT a value that conflicts with the INDEX/CONSTRAINT, an exception will be thrown. 
    Add the unique index:
    CREATE UNIQUE INDEX Unique_Index_name ON TableName(ColumnName)
    Add the unique constraint:
    ALTER TABLE TableName
    ADD CONSTRAINT Unique_Contraint_Name
    UNIQUE (ColumnName)
    Thanks
    Lydia Zhang

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • Itunes could not check for an update to the carrier settings for your iphone. An unknown error occur (-50)

    Have problem with "Check for Updates" for iTunes or accessing iTunes stores.  Called Apple support locally in Singapore who couldnt help resolve the problem and was directed to helpdesk in Norway but after hours on the phone, they still could not solve the problem.  They are also referring solutions from iTunes support FAQs to go through the problem I encountered.  In the end, they said will escalate the matter to next level and will contact me back but they never did.  Other error message include "A program caused iTunes to stop working..."
    I am using a SONY Vaio with Windows 8.  Current iTunes version is 11.1.3.8.  Disappointed with Apple Support.  I was able to do backup with itunes though.  Appreciate anyone who encountered similar problem to share the solution.  Thanks.

    I got the same error but I think I know what's wrong with my situation. My iPhone 4 is programmed for a CDMA carrier that Apple doesn't support. I have limited ability with the phone... but I still love it.

  • How can I get iTunes Store to properly function on my windows 7 laptop? I have tried numerous things such as the MDos Promt, checked for firewall, checked for applications allowing iTunes to not be affected by anything. "Can't connect to network"

    How can I get my iTunes to function properly. It stopped working a couple of days ago and I can't figure how to get back and running. I have tried numerous things such as rebooting, checking for the network connection, applying it to open without security measures. Error message "Your connection time out. Check your connection." Even though I can get into the internet, iTunes is still not responding! Technical support help isn't helping!

    Just to close out ... the 'supervisor' was clueless as it turns out.  Apple does NOT have a deal with UPS on handling the Mini, so the person who gave me the info was wrong.  Did he call back?  No ... he just let me go out and find out myself.
    So I called again, and this time eventually ended up with a manager, who told me that the UPS Store thing wouldn't work, but that a box would arrive and then there would be a 'forced replacement'.
    About 10 minutes later he called back and said he discovered that EVERYTHING the supervisor did was wrong ... he didn't actually properly flag for auto-replace, so I would have gone through an identical cycle again!  So he had to restart the whole process, meaning I would get TWO 'coffins', but that I would then get an auto-replacement and would see that indicated in my support email.
    I got the email, saw 'auto-replace'.  Got the box on the 28th and immediately turned it around.  Apple got the box on the 31st, and on the 1st I got emails that my Mini would arrive on the 2nd and it also had the new serial #.
    Yesterday I grab the box from FedEx and go home to check it out.  As expected, it IMMEDIATELY worked on my WiFi without issue ... and has worked perfectly since.
    So ...
    - it was NOT my home network.
    - it WAS a hardware issue with the Mini
    - Apple does NOT do proper testing on the Mini to detect what appears to be a fairly common issue.
    - non-retail customers ARE treated as second-class by support.
    This issue took FOUR WEEKS to resolve, involved FOUR shipments back & forth, and the ONLY reason it got resolved was that *I* did the troubleshooting that Apple either would not or could not do.
    For someone who has been an Apple customer for more than 30 years, this has been a sobering experience ... I quite frankly expected much better from them.

Maybe you are looking for