Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Cannot Update..theres an error

Cannot Update..theres an error

Scheduled Pinned Locked Moved Database
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blitz2bleach
    wrote on last edited by
    #1

    hello there,i know its not the righ place to ask some query,im cannot access my database in a query pane..i made a database where the username column has value and the password has none for e.g Username:93838383 and password:?..i just want to update the password column inputed by the user I make the query in the stored procedure but the error said: "Incomplete SET clause..unable to parse query text" i just want someone to check out the query and pls tell me what wrong or incomplete to my query UPDATE UserTable SET ((UserTable.[password] = [@password]) WHERE ((UserTable.username = [@username]) another thing is whenever the user visit the site,when the user type the password,it could not be updated anymore..unless i just want to use "select clause" because password column have now values... here is the query SELECT COUNT(*) AS Num_of_User FROM UserTable WHERE (((UserTable.username)=[@username]) AND ((UserTable.pasword)=[@password])); error:unable to parse query text it is correct query for accessing the values from the database? Im using a visual web developer IDE, i dont think if im using a sqlserver 2000 or 2005 thanx for helping

    C H 2 Replies Last reply
    0
    • B blitz2bleach

      hello there,i know its not the righ place to ask some query,im cannot access my database in a query pane..i made a database where the username column has value and the password has none for e.g Username:93838383 and password:?..i just want to update the password column inputed by the user I make the query in the stored procedure but the error said: "Incomplete SET clause..unable to parse query text" i just want someone to check out the query and pls tell me what wrong or incomplete to my query UPDATE UserTable SET ((UserTable.[password] = [@password]) WHERE ((UserTable.username = [@username]) another thing is whenever the user visit the site,when the user type the password,it could not be updated anymore..unless i just want to use "select clause" because password column have now values... here is the query SELECT COUNT(*) AS Num_of_User FROM UserTable WHERE (((UserTable.username)=[@username]) AND ((UserTable.pasword)=[@password])); error:unable to parse query text it is correct query for accessing the values from the database? Im using a visual web developer IDE, i dont think if im using a sqlserver 2000 or 2005 thanx for helping

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      blitz2bleach wrote:

      UPDATE UserTable SET ((UserTable.[password] = [@password]) WHERE ((UserTable.username = [@username])

      The SET clause has two sets of opening brackets and only one closing. The same goes for the WHERE clause. Also, you encapsulate the parameters in square brackets which mean they will be interpreted as column names. I would have written your SELECT query without the profusion of brackets. You also encapsulated the parameters in square brackets which mean they will be interpreted as column names. Try this:

      SELECT COUNT(*) AS Num_of_User
      FROM UserTable
      WHERE username=@username AND pasword=@password;


      Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website

      1 Reply Last reply
      0
      • B blitz2bleach

        hello there,i know its not the righ place to ask some query,im cannot access my database in a query pane..i made a database where the username column has value and the password has none for e.g Username:93838383 and password:?..i just want to update the password column inputed by the user I make the query in the stored procedure but the error said: "Incomplete SET clause..unable to parse query text" i just want someone to check out the query and pls tell me what wrong or incomplete to my query UPDATE UserTable SET ((UserTable.[password] = [@password]) WHERE ((UserTable.username = [@username]) another thing is whenever the user visit the site,when the user type the password,it could not be updated anymore..unless i just want to use "select clause" because password column have now values... here is the query SELECT COUNT(*) AS Num_of_User FROM UserTable WHERE (((UserTable.username)=[@username]) AND ((UserTable.pasword)=[@password])); error:unable to parse query text it is correct query for accessing the values from the database? Im using a visual web developer IDE, i dont think if im using a sqlserver 2000 or 2005 thanx for helping

        H Offline
        H Offline
        Harini N K
        wrote on last edited by
        #3

        Hi Use square brackets if you have spaces in column or table name or if column name is a SQL Keyword For eg., SELECT [ID],[Product Name],Price From [Products of ABC]

        Harini

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups