Function - cmd.ExecuteScalar() problem

I have never been able to .ExecuteScalar() so I must be missing something basic.
My stored procedure in package GTM.SETUP_PKG compiles without errors.
FUNCTION getLabBipk (p_labID IN VARCHAR2) RETURN NUMBER IS
return_value NUMBER;
CURSOR ret_cur IS SELECT bipk FROM gtm.lab WHERE labid=p_labid;
BEGIN
OPEN ret_cur;
FETCH ret_cur INTO return_value;
CLOSE ret_cur;
RETURN return_value;
EXCEPTION
WHEN OTHERS THEN
RETURN 0;
END;
Here is my .NET invocation
OracleConnection conn = new OracleConnection(connString);
OracleCommand cmd = new OracleCommand("GTM.SETUP_PKG.GETLABBIPK",conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("P_LABID","JK-LAB");
cmd.Parameters.Add("BIPK",OracleDbType.Int32,DBNull.Value,ParameterDirection.ReturnValue);
conn.Open();
object bipk = cmd.ExecuteScalar();
conn.Close();
Running this, the cmd.ExecuteScalar() returns two errors:
ORA-06550 line string, column string:string...Cause: A PL/SQL compilation error has occurred.
PLS-00103 found 'string' but expected one of the following: 'string'"}
Thanks

There are two issues here.
1. There is a bug in the ODP.NET code that causes incorrect command text to be generated for stored functions if CommandType.StoredProcedure is used. To work around this problem, you can specify the complete command text and use CommandType.Text instead. For example,
You can change ....
cmd.CommandText = "SP";
cmd.CommandType = CommandType.StoredProcedure;
to ....
cmd.CommandText = "begin :1 := SP(:2); end;";
cmd.CommandType = CommandType.Text;
Of course, number of place holders depend on the number of parameters in your application.
2. ExecuteScalar function of OracleCommand returns the first column of the first row of the OracleDataReader that was created by executing either SELECT query or by a REF Cursor of a stored procedure/function. However, the function does not work if the stored procedure/function does not have a REF Cursor parameter. To work around this issue, you can use ExecuteNonQuery function of
OracleCommand class instead of ExecuteScalar.
I have filed two bugs (2585273 and 2585324) against ODP.NET and these bugs will be fixed in the next release.

Similar Messages

  • Is the on/off button bad function a hardware problem? What can I do if a mobile company don't fix this? Besides, my phone still have the apple warranty

    Hello everyone, I bought an iPhone 5 six months ago from a mobile company. now the on/off button is not working properly. I send it to this company technical service support and they didn’t fix it saying that the button problems are not covered by the warranty; moreover they say that warranty just covers software and hardware problems. First, is the on/off button bad function a hardware problem? What can I do if a mobile company don’t fix this? Besides, my phone still have the apple warranty

    Customer Service: Contacting Apple for support and service - this includes international calling numbers.
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Apple - Support - Contact Apple Support.

  • FireFox 8.0.1 does not work with most sites that functioned with no problems under earlier versions. I wish to uninstall and go back to an earlier version.

    The more I attempt to use FireFox 8.0.1 the more problems I have. I find considerable interference with the functioning of RoboForm, my bookmarks keep disappearing, many sites that worked fine earlier and work fine with the Opera browser do not work under version 8. Where can I download an earlier version of FireFox

    You can [https://support.mozilla.com/en-US/kb/Uninstalling%20Firefox?s=uninstall+firefox&r=0&as=s uninstall] Firefox 8 first before you downgrade to Firefox 7. However, when you uninstall, make sure that you '''don't''' choose the option "'''Remove my Firefox Personal Data'''".
    You can access a list of [ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ Previous Versions of Firefox], however, note that Firefox recommends using the latest version since older version may have security and safety vulnerabilities.
    '''P.S:''' it may be a good idea to create a Restore Point before you uninstall, in case you mess up, in which case you can just restore and start over.

  • VISA Read function Read buffer problem in serial communication

    Hi,  I use VISA write and read function in serial communication app, the device continuously sends 0x00 if it is not receive a request from Labview program running on PC.
    And the request sent by labview is programmable. I met a weird problem, each time the request changes, the VISA read buffer output port still shows the last request firstly, from second time, shows the right request.
    It works like: Req code: ... 50, 51,51,51,50....;  VISA Read buffer: ...50, 50, 51, 51, 51, 51, 50....
    Please refer to the program.
    Attachments:
    readOne_test.vi ‏21 KB

    How are you running this?  You don't have a while loop around it.  Is it part of a larger VI?  Please don't tell me you are using the run continuously button.
    You don't have any wait statement between you VISA Write and your bytes at port.  So it is very likely the receive buffer is still empty since you didn't give your VI time to wait for the device to turn around and give a reply.  If you read 0 bytes, your VISA read string will be empty.  How does your decoder subVI (which you didn't include) handle an empty string?

  • DML in functions is causing problem.

    I have a function as below which is called from a number of procedures and triggers. It just returns the next unique row number in a table for a particular session.
    >>>>>>>>>>>>>>>
    CREATE OR REPLACE FUNCTION "SPR_MAX_VALUE" (tname VARCHAR2,sessn_id NUMBER)
    return NUMBER AS
    V_CURSOR BINARY_INTEGER;
    SL_TAB_STMT VARCHAR2(200);
    V_RETURN_CODE binary_INTEGER;
    SLNO NUMBER(10);
    SL_NO NUMBER(10);
    BEGIN
    DBMS_OUTPUT.PUT_LINE('VALUE OF EMP CODE BEGIN');
    SL_TAB_STMT:='BEGIN SELECT MAX_SLNO ' ||' INTO '|| ':SLNO' ||
    ' FROM TEMP_IDENTITY WHERE SESSION_ID='|| SESSN_ID || ' AND TAB_NAME =''' || ltrim(rtrim(TNAME)) || '''; END;';
    DBMS_OUTPUT.PUT_LINE (SL_TAB_STMT);
    V_CURSOR:= DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(V_CURSOR,SL_TAB_STMT,DBMS_SQL.NATIVE);
    DBMS_SQL.BIND_VARIABLE(V_CURSOR,':SLNO',SL_NO);
    V_RETURN_CODE:=DBMS_SQL.EXECUTE(V_CURSOR);
    DBMS_SQL.VARIABLE_VALUE(V_CURSOR,':SLNO',SL_NO);
    SL_NO:=SL_NO+1;
    UPDATE TEMP_IDENTITY SET MAX_SLNO =SPR_MAX_VALUE.SL_NO WHERE TAB_NAME=SPR_MAX_VALUE.TNAME AND SESSION_ID=SPR_MAX_VALUE.SESSN_ID;
    DBMS_OUTPUT.PUT_LINE('VALUE OF EMP CODE'|| SL_NO||' tNAME'||TNAME||' SESSION '||SESSN_ID);
    DBMS_SQL.CLOSE_CURSOR(V_CURSOR);
    RETURN SL_NO;
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    DBMS_OUTPUT.PUT_LINE ('TOO MANY ROWS RETRIVED');
    DBMS_SQL.CLOSE_CURSOR(V_CURSOR);
    WHEN NO_DATA_FOUND THEN
    DBMS_SQL.CLOSE_CURSOR(V_CURSOR);
         SL_NO:=1;
    INSERT INTO TEMP_IDENTITY VALUES(ltrim(rtrim(TNAME)),SL_NO,SESSN_ID);
    RETURN SL_NO;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE ('TOO MANY ROWS RETRIVED');
    DBMS_SQL.CLOSE_CURSOR(V_CURSOR);
    END;
    <<<<<<<<<<
    Below is the DML which is calling the above function
    >>>>>>>>>>>>>
    INSERT INTO tempp
    SELECT spr_max_value('TEMPP ',sessnid),emp_code,status, effective_date "from_date", category, ( basic_pay + personal_pay
              + special_pay + stagnation_increment ), a.loc_code, b.ne_allow,
              b.assam_allow, b.hill_allow, b.portblair_allow, b.nagaland_allow,
              b.sikkim_allow, 0 "kargil_allow", b.hardship_allow, 0 "maxdate_bit",
              0 "adj0_bit", 0 "adj1_bit", 0 "exist_bit", 0 "old_amt", 0
              "new_amt", 0 "adj0_amt", 0 "adj1_amt", effective_yymm, NULL
              "to_date", 0 "no_days_in_mth", 0 "no_days",sessnid
         FROM HIST_EMPLOYEE a,MST_LOCATION b
         WHERE a.effective_yymm =200711
         and a.loc_code = b.loc_code
         and a.emp_code IN (
                             SELECT emp_code
                             FROM NAGALANDALLOW_TEMP_COUNT
                             WHERE session_id=sessnid
         order by emp_code;
    <<<<<<<<<<<<<<
    The problem I am facing is that ,the function spr_max_value('TEMPP ',sessnid) in the above DML is returning same value for all the rows even though logically it seems it should return unique numbers. It seems the update statement statement within the function is not working as I am expecting.
    Can anyone help me out.

    You are very much correct in the sense that the above
    function is being used for maintaining manual indexes
    and I very agree with you that the present design is
    not a good one but immediately I won't be able to
    change the same due to exigency and volume of
    modifications required.
    The DML is being used inside procedures and it is not
    giving any error.
    Is there any other way out.Nope. Which is an excellent excuse to fix it.

  • Can I use analytical function in this problem?

    Hi,
    I want to use query only for the following . I don't want to wright any function or procedure for this.
    create temp table test_3 (user_id number, auth_id number);
    insert into test_3 values (133,609);
    insert into test_3 values (133,610);
    insert into test_3 values (133,611);
    insert into test_3 values (133,612);
    insert into test_3 values (133,613);
    insert into test_3 values (133,614);
    insert into test_3 values (144,1);
    insert into test_3 values (134,610);
    insert into test_3 values (135,610);
    insert into test_3 values (135,610);
    insert into test_3 values (135,610);
    insert into test_3 values (136,610);
    insert into test_3 values (136,610);
    insert into test_3 values (137,610);
    insert into test_3 values (137,610);
    insert into test_3 values (137,609);
    insert into test_3 values (137,11);
    I want to count:
    1. for each auth_id, how many users are there who is assigned to this aut_id only
    example
    user_id 134 and 135 is assigned to auth_id 610 only and the count is 3 and 2 respectively .
    user_id 144 is assigned to auth_id 1 only and the count is 1.
    2.how many user_id is common between auth_id 609 and 610
    how many user_id is common between auth_id 609 and 611
    how many user_id is common between auth_id 609 and 612
    and so on.
    I have re-written the problem bellow
    Regards,
    Edited by: user576726 on Feb 13, 2011 3:54 AM

    Hi,
    user576726 wrote:
    Hi,
    Thanks for the response.
    drop table test_3;
    create table test_3 (user_id number, auth_id number);
    insert into test_3 values (133,609);     --row 1
    ...Thanks. That makes the problem a lot clearer.
    My desired output is:
    auth_id_1 auth_id_2 count1 count2
    1 12 1 --(user_id 144) 2 --(row 15, row 16)
    1 610 1 --(user_id 144) 1 --(row 19)
    11 609 1 --(user_id 137) 1 --(row 13)
    11 610 1 --(user_id 137) 2 --(row 11, row 12)
    12 1 1 --(user_id 144) 1 --(row 4)
    12 610 1 --(user_id 144) 1 --(row 19)
    609 11 1 --(user_id 137) 1 --(row 14)
    609 610 2 --(user_id 133 & 137) 3      --(row 2, row 11 and row 12)
    609 611 1 --(user_id 133) 1 --(row 3)
    610 1 1 --(user_id 144) 1 --(row 4)
    610 11 1 --(user_id 137) 1 --(row 14)
    610 12 1 --(user_id 144) 2 --(row 15, row 16)
    610 609 2 --(user_id 133 & 137) 4 --(row 1, row 13, row 17 and row 18)
    610 611 1 --(user_id 133) 1 --(row 3)
    611 609 1 --(user_id 133) 3 --(row 1, row 17 and row 18)
    611 610 1 --(user_id 133) 1 --(row 2)               1 --(user_id 133)               1 --(row 2)
    Count1 is the number of common different user id between auth_id_1 and auth_id_2
    example
    for the first row in the output:-
    common user ids between 609 and 610 are 133 and 137. so the count1 should be 2
    Count2 is how many rows are there for auth_id_2 where user id is common for auth_id_1 and auth_id_2
    example
    for the first row in the output:-
    the common user_id for 609 and 610 are 133 & 137
    the rows in the test_3 table that has auth_id 610 and user_id 133 & 137 are
    row 2, row 11 and row 12 so the count is 3.
    What I have done is
    I have writtent the following query to get the first two columns of the output:
    select tab1.auth_id auth_id_1, tab2.auth_id auth_id_2
    from
    (select user_id, auth_id
    from test_3
    group by user_id, auth_id
    ) tab1,
    (select user_id, auth_id
    from test_3
    group by user_id, auth_id
    ) tab2
    where tab1.user_id = tab2.user_id
    and tab1.auth_id <> tab2.auth_id
    group by tab1.auth_id, tab2.auth_id
    order by 1,2;You're on the right track. You're doing a self-join and getting the right combinations of auth_id_1 and auth_id_2.
    Why are you doing the GROUP BY in sub-queries tab1 and tab2? Eventually, you'll need to count identical rows, like these:
    insert into test_3 values (137,610);     --row 11
    insert into test_3 values (137,610);     --row 12If you do a GROUP BY in the sub-queries, all you'll know is that user_id=137 was related to auth_id=610. You won't know how many times, which is what count2 is based on. So don't do a GROUP BY in the sub-queries; just do the GROUP BY in the main query. That means you won't need to do sub-queries; you might as well just join two copies of the original test_3 table.
    Count1 is the number of common different user id between auth_id_1 and auth_id_2Great; that's very clear. In SQL, how do you count the number of different user_ids in such a group? (Hint "different" means the same thing as "distinct".)
    Count2 is how many rows are there for auth_id_2 where user id is common for auth_id_1 and auth_id_2
    example
    for the first row in the output:-The first row in the output you posted was
    1 12 1 --(user_id 144) 2 --(row 15, row 16)Isn't this one that you're explaining here the 8th row of output?
    the common user_id for 609 and 610 are 133 & 137
    the rows in the test_3 table that has auth_id 610 and user_id 133 & 137 are
    row 2, row 11 and row 12 so the count is 3.So, for count2, you want to know how many distinct rows from tab2 are in each group. If you had a primary key in the table, or anything that uniquely identified the rows, you could count the distinct occurrences of that, but you're not storing anything unique on each row (at least you haven't mentioned it in your sample data). If that's really the case, then this is one place where the ROWID pseudocolumn is handy; it uniquely identifies any row in any table, so you can just count how many different values of tab2.ROWID are in each group.

  • PCA Functional Area Report Problem With Co-Product Settlements

    I have built a profit center functional area report for use in a manufacturing client.  The reason is because the factory cost centers flow to the product cost (via costing sheets) and the administrative cost centers are expensed monthly.  However, SAP seems to have no other approach to handle the issue where common expense elements must be reported in these two separate sections.  Anyway, here is my problem:
    After creating the functional areas and matching them to each cost center appropriately and then applying a different functional area to orders, I see that settlement of co-products causes my report to zero out the functional area that should match the overhead cost centers.  These obviously should not be impacted by settlement and I see that they are not impacted in the transactional data.  However, the functional area report shows a different story.  I believe it somehow has to do with the unusual way that co-product split up and settle versus other types of orders.  I may need some sort of subtitution rule, but like I said, the raw transactional data looks correct and the report should bring in these values. 
    I used ledger 8A if that helps.  I am sure I missed some small thing somewhere.
    David

    It looks to me like the New G/L may have taken care of some of my issue.  The FI reconciliation G/L account (690000 usually) includes the secondary cost center postings as well as the secondary order postings.  The cost center side of the secondary transaction reflects the functional area for cost centers (Factory Exp or Admin Exp in my case), whereas the order side of the secondary posting shows the functional area associated with order consumption (Net Consumption in our case). 
    This appears to mean that the standard report for Functional Areas from FI should work to break up the income statement for manufacturing purposes.  This report is S_PLO_86000029.  That report looks to me like it will replace my need for a PCA based Functional Area Report.
    David

  • SAP DBM 6 Downpayment Functionality Issues or Problems

    Dear All,
    Requesting all to share any problem/issue faced in Down Payment Functionlity provided by SAP in DBM 6.0 with cash desk or any.
    If possible please share solutions for same.
    Thanks in Advance.
    Regards,
    Manan Patel

    As per my knowledge there isn't any standard integration for DBM cash desk direclty with credit / debit card machine, however you can build a custom interface.
    The standard credit card functionality can be used here by implementing the BADI "/DBM/BADI_TILL"
    One of my previous experience we added an additional push button on the cash desk screen to do similar kind of requirement & intern call the BADI "/DBM/BADI_TILL"
    You will have to define various payment types "Credit card", "Debit card", Cash etc..
    Regards,
    Sachin Balmiki

  • G460 Function Menu Bar problem..pls help!

    Dear all,
    I'm new here. I'm a user of G460 laptop. Have one serious problem is the function menu is not popping up even tho already pressed Fn + F5 (or every function it has). For example, when I raise/lower the volume, usually it will pop out a small volume meter on the bottom right corner...I've seen this in my colleague's computer (same model) but mine is not popping up, same goes to the brightness...How to enable back the menu shown in the screen? Pls help...
    Solved!
    Go to Solution.

    32 bit - 64 bit
    right click my computer > properties and check the version of windows 7 ( 32 or 64 bit ) then download the drivers, re-install.

  • Function calling & Caching problem..

    hello all..
    i hav made scenario of RFC as sender..and when i call the function module for the first time it gets executed and then from second time it doesnt and goes into short dump..
    also even when the function gets called the message is not displayed in the XML processed messages and also the cache shows updated..
    is ther some cache other than SXi which needs to be updated when RFC as sender, if yes wher is it and how to refresh..?
    also can someone tell me wot is CPA cache..??
    and wot it does.?
    regards..
    vishal

    Check Michal's Blog
    /people/michal.krawczyk2/blog/2005/05/10/xi-i-cannot-see-some-of-my-messages-in-the-sxmbmoni
    Then you will be able to see what the problem is.
    regards
    SKM

  • Passing regexp_replace backreference to a function; type conversion problem

    I am trying to convert some text within my CLOB field to HTML links.
    The format of the (part of the link I am having problems with) is:
    <link 12>
    which I wish to convert to
    url_dest
    I am trying to pass the backreference \1 (being the number 12 in this case) in regexp_replace to a simple function I have made and when I run it I receive the error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I have tested the function on its own with passing a string and it works fine.
    I have passed the string from the backreference to the function and back out as the return value and it works fine.
    However, when I try to pass the string back reference (a set of digits) to use as the NUMBER ID in my where clause, it always returns this error. I have tried CASTing / TO_NUMBER in every way possible I can think of, using temporary variables etc. and still the same error.
    =====
    CREATE OR REPLACE
    FUNCTION GETLINK (linkid IN CLOB)
    RETURN VARCHAR2 AS
    linkstring VARCHAR2(4000);
    linkchar VARCHAR(4000);
    linkint NUMBER;
    BEGIN
    linkchar := TO_CHAR(linkid);
    linkint := TO_NUMBER(linkchar);
    SELECT url_dest INTO linkstring FROM TABLE WHERE ID = linkint;
    RETURN linkstring;
    END;
    =====
    Offending calling code:
    tempcontent := regexp_replace(myClobField, '<link ([[:digit:]]*)>', GETLINK('\1'));
    =====
    I have tried implicit and explicit type conversions that vary the above function; in parameters as VARCHAR2; etc.; no joy.
    Is this a bug within the database, is it by design, or is it just me making a hash of things? I really don't want to have to pull the XML into PHP then run the PHP regex functions with Oracle DB queries to do this!
    Many thanks for your assistance.
    Ingram

    Many thanks for the reply, but I'm not sure how that would work. I wish to do a global regexp_replace on all instances of '<link> ([[:digit:]]*)>' within my XML document, with the return value from the GETLINK function.
    So for instance.
    The return value of GETLINK could be in format:
    &lt;a href="\1"&gt;
    so an XML document of:
    =====
    &lt;doc&gt;
    &lt;link 12&gt;Test Link&lt;/link&gt;
    some content
    &lt;link 783&gt;A second Test Link&lt;/link&gt;
    &lt;/doc&gt;
    =====
    would return as:
    =====
    &lt;doc>
    &lt;a href="12"&gt;Test Link&lt;/link&gt;
    some content
    &lt;a href="783"&gt;A second Test Link&lt;/link&gt;
    &lt;/doc&gt;
    =====
    Obviously I would then do the other replacements to fix broken XML with the non matching end tags etc.
    TIA

  • Runtime.Exec with cmd and problem in waitFor

    Hi
    I am running
    Process p1 = Runtime.getRuntime().exec("cmd /c start /min <some.exe> <args to exe>");
    then I am checking
    Int ExitVal = p1.waitFor;
    If (ExitVal != 0) and so on.
    However, the problem is that the p1.waitFor does not really block the thread. It returns 0 and the program continues even though the some.exe has still not completed its execution.
    My guess is that Java is giving the exitcode of cmd.exe and not some.exe.
    If this analysis is correct, I am stumped. How do I get the exit code of some.exe?
    If my analysis is wrong, please help me in the right direction.
    Regards
    Shreekar

    "Enables a user to start a separate window in Windows
    from the MS-DOS prompt."<p>
    Again, I read it afterwards. However, another funny thing is happening now. Initially my command was
    "cmd start /min (some.exe) (some args) > somefile.txt"
    (I know I missed to show the output redirection in my original post.)
    </p>
    <p>
    Then I removed "start /min", it is working as expected.
    Then I removed the output redirection and now it hangs !!!
    I put back the output redirection and it is working. Does the output redirection make it wait in some way and force it to exit gracefully?
    </p>
    Any ideas?

  • Wuauclt cmd line problems

    Hello all,
    i have some problems with wuauclt, which i cannot explain myself. Hopefully you can help me out.
    So i try to force updates over wuauclt on client pc's, which is made by a simple .bat - scheduled by the windows task scheduler.
    It seems that all is working fine for now, but in the end i don't know why one update is not installed by the .bat .
    To show what the .bat will do, here the code :
    @echo off
    echo --------------------------------------------------- >> C:\vmlog.txt
    echo Update_ausgeführt >> C:\vmlog.txt
    echo %Computername%_%time:~0,2%%time:~3,2%_%DATE:/=% >> C:\vmlog.txt
    echo --------------------------------------------------- >> C:\vmlog.txt
    start "update" /wait "c:\windows\system32\wuauclt.exe" /resetauthorization /detectnow
    start "update" /wait "c:\windows\system32\wuauclt.exe" /updatenow
    Simply, some log infos before the update push starts.
    It works till now, because when i look into the gui i can see there are 2 Updates left to install.
    But i can do what i want, it doesn't install the remaining updates. Following Updates are still in "important"
    checked : KB890830 (removal Tool)
    unchecked : .NET Framework 4.5.1 for Win 7 KB2858725
    Even if i run cmd as admin and type "wuauclt /updatenow" it won't work.
    Also when i stop and start the windows update service again, to re-initiate it - same problem.
    My goal is to get a 100% up2date windows as far as possible. This means, if any updates are installable, it should be done.
    Do you can help me out, why windows don't install the updates by command line ?
    I don't want to use the gui, it has to be solved by .bat
    Thanks a lot !
    Holger

    <snip>
    I don't want to use the gui, it has to be solved by .bat
    Thanks a lot !
    Holger
    Hi,
    If you're looking for help with a batch file, you'll need to post in the Scripting Guy's forum here:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc&brandIgnore=true&page=1
    This forum is meant for PowerShell questions.
    Good luck.
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • Wuauclt cmd line problems (bat file)

    Hello all,
    i have some problems with wuauclt, which i cannot explain myself. Hopefully you can help me out.
    So i try to force updates over wuauclt on client pc's, which is made by a simple .bat - scheduled by the windows task scheduler.
    It seems that all is working fine for now, but in the end i don't know why one update is not installed by the .bat .
    To show what the .bat will do, here the code :
    @echo off
    echo --------------------------------------------------- >> C:\vmlog.txt
    echo Update_ausgeführt >> C:\vmlog.txt
    echo %Computername%_%time:~0,2%%time:~3,2%_%DATE:/=% >> C:\vmlog.txt
    echo --------------------------------------------------- >> C:\vmlog.txt
    start "update" /wait "c:\windows\system32\wuauclt.exe" /resetauthorization /detectnow
    start "update" /wait "c:\windows\system32\wuauclt.exe" /updatenow
    Simply, some log infos before the update push starts.
    It works till now, because when i look into the gui i can see there are 2 Updates left to install.
    But i can do what i want, it doesn't install the remaining updates. Following Updates are still in "important"
    checked : KB890830 (removal Tool)
    unchecked : .NET Framework 4.5.1 for Win 7 KB2858725
    Even if i run cmd as admin and type "wuauclt /updatenow" it won't work.
    Also when i stop and start the windows update service again, to re-initiate it - same problem.
    My goal is to get a 100% up2date windows as far as possible. This means, if any updates are installable, it should be done.
    Do you can help me out, why windows don't install the updates by command line ?
    I don't want to use the gui, it has to be solved by .bat
    Thanks a lot !
    Holger
    So here my question again, this time the correct forum :)
    Thanks for any help !

    Hi,
    start "update" /wait
    "c:\windows\system32\wuauclt.exe"
    /updatenow
    This is an undocumented and ineffective command line.
    I have never, ever seen this command working.
    To force a computer too install updates, you can :
    - Set a deadline to these updates. But be aware that these deadlines will apply to all computers that need these updates. And there is some serious drawbacks (reboot behaviors).
    - Use Windows Update Agent API. See UpdateHF.vbs
    http://community.spiceworks.com/scripts/show/82-windows-update-agent-force-script-email-results-version-2-6
    David COURTEL
    IT Technician
    Wsus Third-Party Softwares Publishing :
    http://wsuspackagepublisher.codeplex.com

  • Count / sum function in report problem

    Hi
    In my report i was using this code to output the area code and count the man_suspend records from the Trans_code colum. Like so
    SELECT AUN_CODE,
    COUNT(*) FROM rr_transaction WHERE trans_code = 'MAN_SUSPEND'
    GROUP BY AUN_CODE
    AUN_CODE      COUNT(*)
    201                   1
    202                   1
    204                   3But it wasnt outputing the zeros so i tried using the follwoing statements:
    select aun_code,sum(case when rr_transaction.trans_code = 'MAN_SUSPEND' then 1 else 0 end)
    from rr_transaction
    group by aun_code
    SELECT AUN_CODE,
    count(case when trans_code = 'MAN_SUSPEND' then 1 end)
    FROM rr_transaction
    GROUP BY AUN_CODE
    These two statements do give me the desire output
    of :
    AUN_CODE      COUNT(*)
    200                   0
    201                   1
    202                   1
    204                   3etc
    But when i try using these select statments in my data model in Oracle reports it creates the query box with a broken data link icon and wont let me join it to other queries (the aun_code is the primary key)
    Im abit stumped why it will work the first select statement but not the other two!??

    Much nicer than my paltry attempt.
    select iv2.object_type,nvl(object_count,0) object_count
      from
    SELECT object_type,
                COUNT(object_id) object_count 
      FROM user_objects
    WHERE object_type  in ('TABLE' ,'FUNCTION','INDEX','PACKAGE')
    GROUP BY object_type
    ) iv1
    (select distinct object_type
                  from user_objects) iv2
               where iv2.object_type = iv1.object_type(+)

Maybe you are looking for

  • My Computer Only recognizes My IPhone 4 As A Digital Camera

    When I plug my iPhone into my laptop, it does not show up in iTunes. I'm running windows 7 with iTunes version 10.0.1.22. When I run a diagnostic in iTunes it says that no iPhone is connected, I have tried different USB ports, different USB cables, I

  • Horizontal scroll bar for the adf page

    Hi, We have around 7 tables in single jsff page. Here , we have a requirement like : We need to show horizontal scroll bar for the entire page instead of each table. Is there any way to get this. As of now, we have horizontal scroll bar for each tabl

  • Programmatically create custom attributes in KM

    Hi all, We are implementing an application which uploads/downloads files to/from KM content of a portal user. The application will also display the list of files for the portal user. The file list displays the standard file attributes: filename,  cre

  • FaceTime issues on MacBook

    When my friend tries to call me on Facetime from his laptop, the call goes to my phone, regardless of whether he calls my phone number or my e-mail address. Similarly, if I try to call him from my laptop (using phone number or e-mail address), the ca

  • "Not Pemitted" when I try to play.

    Hi, I made a slideshow in Fotomagico & made a disc images which played on my iBook if I hit enter but not if I hit play & when I burned it it wouldn't play in a stand alone DVD player. Didn't even show anything. I used iDVD to make a disc image which