Results 1 to 8 of 8

Thread: Error for UPDATE statement

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Posts
    93

    Error for UPDATE statement

    can someone guide me wats wrong with this statement??

    sqlString3 = "UPDATE USER_LOGIN_T SET PASSWORD = '" + TextPassword.Text _
    + "', LOGIN_NAME = '" + TextUser.Text + "', ACCOUNT_TYPE = '" + ComboOccupation.Text _
    + "' WHERE NRIC = '" + TextNRIC.Text + "'"

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error for UPDATE statement

    It looks ok... what is the error, and what are the data types of the fields?

    (one thing tho, password should be in square brackets, eg: [password] )

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Error for UPDATE statement

    Quote Originally Posted by xiaofeiii
    can someone guide me wats wrong with this statement??

    sqlString3 = "UPDATE USER_LOGIN_T SET PASSWORD = '" + TextPassword.Text _
    + "', LOGIN_NAME = '" + TextUser.Text + "', ACCOUNT_TYPE = '" + ComboOccupation.Text _
    + "' WHERE NRIC = '" + TextNRIC.Text + "'"
    First, lose the + signs unless you wish to add two numbers together.

    For concantination use the & sign.

    As si_the_geek asked, are you getting an error message?

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Error for UPDATE statement

    RB.... since when does one put a comma after the LAST field being updated?

    xiaofeii - still waiting ot hear what the error message is... that will go a loooong way to helping you out.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Error for UPDATE statement

    Quote Originally Posted by RhinoBull
    Since today ...
    Great, now my post won't make sense since you deleted yours....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Error for UPDATE statement

    Quote Originally Posted by techgnome
    Great, now my post won't make sense since you deleted yours....

    -tg
    Fear not tg, I saw it

  8. #8

Posting Permissions

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



Click Here to Expand Forum to Full Width