UPDATE sql command won't work

Hi,
I have troubles using UPDATE command. I have ACCESS database and a table created by
create table ACCOUNTNAMES (ACC_ID VARCHAR(30) primary key, ACC_NAME VARCHAR(40), ACTIVEPASSIVE VARCHAR(30))accessed by
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conection = DriverManager.getConnection("jdbc:odbc:mydatabasename", username, password);
statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
resultSet = statement.executeQuery("SELECT * FROM ACCOUNTNAMES");
// Working with resultSet
statement.executeQuery("update ACCOUNTNAMES set ACC_NAME = "TEST" where ACC_ID = "60"");I have SQL exception at this point saying
"[ODBC MS Access Driver] Too few parameters. Expected 2"
I have a row with ACC_ID = 60 in the table. "Expected" might also be 1.
Please give me your advice.

statement.executeQuery("update ACCOUNTNAMES set ACC_NAME = "TEST" where ACC_ID = "60"");Is TEST a variable nameif so you have to concatenate it
try the below stmt. to update the ACC_NAME as TEST.
statement.executeQuery("update ACCOUNTNAMES set ACC_NAME = 'TEST' where ACC_ID = 60");

Similar Messages

  • Sender JDBC Communication Update SQL Command Problem!

    Hi all,
    I am trying to do a SENDER JDBC Scenario in XI.
    I fetch the Records from the table Once per day based on the Current Date.
    I do not have any Update Credentials in the table.
    I can only perform Select Querry.
    But when i am trying to configure the SENDER JDBC Channel its asking me to enter value for Update SQL Command in Sender JDBC communication channel Process Parameters.
    Its not accepting BLANK or ' * '  Values.
    But i have only Select Querry credentials in the table. I can only pick the values cant Update the tables but.
    In the Above scenario how can i configure the Sender JDBC CC without Updating the Table after fetching the value?
    Please Advice
    Regards,
    Senthilprakash.

    Hi,
    Specify the Update SQL Statement value as .
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Thanks
    SaNv...
    Edited by: Sãnthosh Kûmãr  V on Oct 8, 2008 10:44 AM
    Edited by: Sãnthosh Kûmãr  V on Oct 8, 2008 10:45 AM

  • Did the iTunes update & now it won't work at all!

    I downloaded the iTunes update 2 days ago, and now iTunes won't work because it needs 10.4.9+ & all I have is 10.4.8
    I tried to download the 'Combo' 10.4.11 but it crashed my system (the 'Restart' hung with turning wheel for over 2 hours) & I had to reboot from disk at the cost of several hours.
    I only use iTunes for listening to the radio worldwide, nothing else. I have no iPod, have no purchased music.
    Is there any way to uninstall the update? iTunes was just fine for me before the update.
    Or, is there any way to install the 10.4.11 from a friend's disks? - since it's just an 'Update' which is available online, it doesn't sound like it would be illegal, but I want to keep "Kosher". I am assuming that even though the downloaded update crashed my system, loading from disk should work.
    Any help would be appreciated - I am not very computer literate, so the simpler the better!
    -Erik

    Finally solved the problem by going back to an older version of iTunes, which I found on FileHippo.com - I chose version 7.0 since I had no idea what older version I used to have.
    The uninstall was the hard part, but these instructions did the trick:
    http://www.oldapps.com/forum/showpost.php?p=925&postcount=34
    Even then, when I got the "iTunesSetup.exe", clicking on it got the message:"iTunes library cannot be read because it was created by a later version of iTunes". Apparently some fragment of the "update was hiding somewhere.
    I finally solved this by right-clicking (option+click) on it.
    So now I have iTunes back & have no need for the "Combo Update"
    At this point, having had a week of frustration from that worse-than-useless "Update", I have no intention of messing with any more "Updates". This computer is, and will remain a 10.4.8 machine.

  • I cal won't work with my new Snow Leopard OS and I can't find an updage, i cal won't work with my new Snow Leopard OS and I can't find an update, i cal won't work with my new Snow Leopard OS and I can't find an update

    I upgraded to Snow Leopard because I want to upgrade to Lion so that I can upgrade my IPad2 to IOS5! All sorts of problems with this - but one is that iCal won't work (I haven't completed upgrade to Lion yet) and I can't find an update to make Ical work with Snow Leopard.

    Oh and it also says:
    Missing component: /Library/Printers/Lexmark/Drivers/.Resources/5600-6600 Series Color 2.lut

  • My Ipod updated and now won't work

    Pior to this, it was working fine. I connected my Ipod and as usual Itunes sync'd and advised that there was a software update. I updated the software and it installed and now my Ipod won't work. It had a darkened screen with the battery showing, the date on top has changed by skip forward a day, the spoked wheel showing processing is displayed but isn't moving. It seems to be frozen and not responsive to any touch. I tried to reset it as per the website by holding the on/home button for 10secs and it kepted getting locked onto the apple logo and nothing else. I restored it and it took ages and appeared with the same screen and then it seemed to come good. Except all my music and photos are gone and its now frozen on the music screen with no options, just a white screen. It chimes like its on the charger and displays the charging icon on the top, even when its not plugged in. It won't reset again either (home/on) it's just staying on that screen.
    I only just got it in Sept 10 so its only four months old and this only started happening after the update to 4.2.1. What's going on?

    Welcome to the discussions,
    try to connect in recovery mode, shown here: http://support.apple.com/kb/HT1808
    Then restore "as new ipod" without using the last backup to restore your data and settings from, it may contain corrupt data.

  • SQL commands doesn't work

    I've instaled an oracle lite8i version 4.0.0.2.0 on Windows 98 operation system.
    When i try to change something in polite DB, the sql commands doesn't cause any effect on the polite.
    For example :
    when i type "alter user system identified by asd", even connected as system, i receive the message "Operation 0 succeeded", but the password doesn't change.
    This also happen with "create user ... " "create table ... "
    What should i do ????
    Thanks

    "/" does work . Please give a full working example that doesn't work.
    In Home>SQL>SQL Commands you usually execute a single command.
    But you can write multiple commands like:
    create table xx1(n number)
    drop table xx1
    /To execute one after the other, just highlight the first
    create table xx1(n number)
    /and press <ctrl>+<enter> .
    Then highlight the next command and press <ctrl>+<enter> again.
    --- OR ---
    create a sql script in Home>SQL>SQL Scripts . Then you can execute multiple commands at once.
    ~Dietmar.

  • My Invert command won't work.

    I am having a difficult time. My invert won't work, not even when I run actions. I am very frusterated. Please help.

    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • SQL command IN is working , but NOT IN is not working for the below code...

    In application code I have the below code.
    IF v_service_variant NOT IN(0,1,2,3,4) THEN --Checking whether existing service variant is applicable in 21Cn Fibre.
    v_service_variant := 3; --If not making it as a standard service
    UPDATE sspt_sessions_table SET service_variant = v_service_variant WHERE sess_id=v_sess_id; --Updating sspt_sessions_table
    SELECT DECODE(service_variant_id, 0, 'None', 1, 'Loadbalancing', 2, 'Failover',3, 'BGP4', 4, 'Backup') INTO l_service_variant --To get the service variant name
    FROM sspt_maj_resilience WHERE service_variant_id=v_service_variant;
    UPDATE sspt_prquote_details SET service_variant = l_service_variant WHERE ftip=l_ftip AND sess_id=v_sess_id; --Updating sspt_prquote_details
    COMMIT;
    END IF;
    Then the statements inside the if condition are not being executed. At the same time if I am replacing NOT IN with IN only and making changes to get if condition true then it is going inside the IF condition.... Could anyone please help me on this

    950474 wrote:
    In application code I have the below code.
    IF v_service_variant NOT IN(0,1,2,3,4) THEN --Checking whether existing service variant is applicable in 21Cn Fibre.
    v_service_variant := 3; --If not making it as a standard service
    UPDATE sspt_sessions_table SET service_variant = v_service_variant WHERE sess_id=v_sess_id; --Updating sspt_sessions_table
    SELECT DECODE(service_variant_id, 0, 'None', 1, 'Loadbalancing', 2, 'Failover',3, 'BGP4', 4, 'Backup') INTO l_service_variant --To get the service variant name
    FROM sspt_maj_resilience WHERE service_variant_id=v_service_variant;
    UPDATE sspt_prquote_details SET service_variant = l_service_variant WHERE ftip=l_ftip AND sess_id=v_sess_id; --Updating sspt_prquote_details
    COMMIT;
    END IF;
    Then the statements inside the if condition are not being executed. At the same time if I am replacing NOT IN with IN only and making changes to get if condition true then it is going inside the IF condition.... Could anyone please help me on thishow can we reproduce what you report?
    while "not working" may be 100%, it is also 100% devoid of any actionable detail.
    what results when it is not working?
    how would working results supposedly appear?
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Su command won't work in MBA 2011 Lion 10.7.1

    Hi All,
    I have an iMac, 3 MBPs running Lion and Snow Leopard. In all of them, su command works just fine and of course I had no issues with them for many years.
    I just bought a MBA 2011 and it came with Lion 10.7 which I updated to 10.7.1. The su command just simply refuses to work. It display 'su: sorry' as if I typed the wrong password.
    1) I tried my own account password which is an administrator. Didn't work
    2) Enable root account and set the password. Didn't work (I checked in my all other machine, don't need to enable root as the 'enable root' is still avaialable where as if it has been enabled only 'disable root' option will be displayed
    3) Created another account (admin) also didn't work.
    What did I miss here?

    On the logs:
    2:36:25 AM su: BAD SU (username) to root on /dev/ttys000
    Just reformat my system and restore with fresh un-updated stock Lion, still the same issue.

  • SQL command IN is working whereas NOT IN   not working

    In application code I have the below code.
    IF v_service_variant NOT IN(0,1,2,3,4) THEN --Checking whether existing service variant is applicable in 21Cn Fibre.
    v_service_variant := 3; --If not making it as a standard service
    UPDATE sspt_sessions_table SET service_variant = v_service_variant WHERE sess_id=v_sess_id; --Updating sspt_sessions_table
    SELECT DECODE(service_variant_id, 0, 'None', 1, 'Loadbalancing', 2, 'Failover',3, 'BGP4', 4, 'Backup') INTO l_service_variant --To get the service variant name
    FROM sspt_maj_resilience WHERE service_variant_id=v_service_variant;
    UPDATE sspt_prquote_details SET service_variant = l_service_variant WHERE ftip=l_ftip AND sess_id=v_sess_id; --Updating sspt_prquote_details
    COMMIT;
    END IF;
    Then the statements inside the if condition are not being executed. At the same time if I am replacing NOT IN with IN only and making changes to get if condition true then it is going inside the IF condition.... Could anyone please help me on this

    Hi,
    Does this happen when using SQL*Developer or if you run the SQL in SQLPLUS ?
    If it is when running in SQLPLUS then it woul dbe better to raise it in the SQL Forum -
    Forum: SQL and PL/SQL
    PL/SQL
    This forum is for problems using SQL*Developer.
    Regards,
    Mike

  • Dictation Commands won't work with Word

    The enhanced Dictation Commands work but not on Word. It does recognise some of the commands, but mostly it just turns them into text. Has any one else experienced this or got a solution?

    I have just installed Rh10 for Word on a new machine and initially I got this message.
    I wonder if you have followed those instuctions? I changed the setting to Enable All.
    The other possibility is what do you have set for the default version? If it is 2007 and that no longer exists on your machine, then Rh will not be able to proceed. The dropdown should show 2010
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Send Unix command won't work under 10.2.8

    So I am running this command in a lab of 10.2.8 machines. I go to send Unix Command then I put this in:
    Send Unix Command
    user: root
    osascript -e 'tell application "System Events" to keystroke "map"'; \
    osascript -e 'tell application "System Events" to keystroke tab'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke "map"'; \
    osascript -e 'tell application "System Events" to delay 0.5'; \
    osascript -e 'tell application "System Events" to keystroke return'
    Then I check Display all output.
    Then I check Run command as User: Root
    Then I send it.
    After that in the Display all output shows me this.
    cms132-30 (64.8.180.103)
    /bin/bash: Send: command not found
    /bin/bash: user:: command not found
    execution error: System Events got an error: NSCannotCreateScriptCommandError (10)
    execution error: System Events got an error: NSCannotCreateScriptCommandError (10)
    execution error: System Events got an error: NSCannotCreateScriptCommandError (10)
    execution error: System Events got an error: NSCannotCreateScriptCommandError (10)
    So I close that window and see an error message by that machine that says:
    Error: 1 "execution error: system events got an error: NSCannotCreateScriptCommandError (10)"
    So what is wrong with this? It works fine with 10.3.9 but not with 10.2.8
    Imac   Mac OS X (10.2.x)  

    It doesn't appear that the System Events under 10.2.x responds to the keystroke command (it doesn't appear in the AppleScript Dictionary.)

  • Update 3.613 won't work on my mac is something wrong with update

    like it freezes....still updating after several hours

    I can't post a screenshot because the internet on my conputer doesn't work. I'll just type it out:
    (Network Name)
    DIsconnect from (Network Name)
    IP Address:
    Router:
    Internet: Reachable
    Security:
    BSSID:
    Channel:
    Country Code:
    RSSI:
    Noise:
    Tx Rate:
    PHY Mode:
    MCS Index:
    and on the dns servers is just says:
    under dns servers it says: 10.0.1.1
    and under search domains it says: brittanyroad.com

  • Macbook pro EFI firmware Update 1.4 won't work, neither will software

    I got two probs, not sure how related they are.
    #1 is that I can't successfully do the macbook pro EFI firmware Update 1.4. My computer was bootcamped and kept restarting in windows - thus the update was not completed - the completion bar would pop up for an instant - i could not see if it had completed, i don't think so... and then it would flash back to black, and restart again. Upon restart the firmware update was still there as needing to be updated.
    I've now taken bootcamp off and restored a single drive. It's doing the same thing and hasn't updated.
    #2 is that DVD studio pro will not boot anymore after it has been working with no problems for over a year. Nor will Motion run although it has never worked. I have tried reinstalling multiple times and just today went to delete the preferences. No luck.
    Any suggestions or better yet, solution, I'm ever so grateful.
    Cheers
    -k

    I have the same problem. It's also important to note that, in my case, I'm running 10.7.2 (11C74), but it's a firmware update, so it shouldn't really matter if I'm running a beta version of Lion, should it?

  • Update 10.6 won´t work

    Hi everybody,
    I encountered following problem.
    I tried to update ITunes to the newest version 10.6 on my MS Win7 (32Bit) System.
    The file was downloaded and installed to certain point and stopped.
    I treid this several times, with the same errormessage." It couldnt update, because an error encountered.... Your system remain´s as it was ..."
    (All error messages are translated from german, and aren´t quite the same as I write here)
    Now I tried to synchronise with Itunes 10.5.? my IPAD. But there was no device in Itunes.
    OK, I looked to the support page from apple and They said to deinstall all apple sw and reinstall Itunes with the newest version, what I did.
    I deinstalled all sw and tried to install itunes.
    It worked perfect, until the installation tried to start the "tasks". It appeared an message "you don´t have enough rights to install Apple mobile device support"
    (I´m signed in as administrator!)
    I ignored this message. Now I have ITunes 10.6 installed but I still cannot synchronise my IPAD with my computer.
    Does anybody knows went wrong ???
    Please help

    iTunes 10.7 does indeed work on OS X 10.8 Mountain Lion. Do you mean you have Mac OS X 10.5.8 Leopard? If so, and you updated your iPhone 4S to iOS 6 on some other computer, then you may be out of luck synching to your 10.5.8 system, but you can get and try 10.6.3 here:
    http://support.apple.com/kb/DL1575
    Regards.

Maybe you are looking for