Using update and where (SQL)

Posted on 2006-03-26
Last Modified: 2010-04-23
I am trying to update two fields within my Access database, what is wrong with this syntax??!!

strSQL = "UPDATE [Student] Set [Username] = '" & uName & "', Set [Pwd] = '" & pwd & "'  WHERE StudentIDNo = " & SID & ""
Question by:ab2ae
    LVL 33

    Accepted Solution

    try this

    strSQL = "UPDATE [Student] Set [Username] = '" & uName & "', [Pwd] = '" & pwd & "'  WHERE StudentIDNo = " & SID & ""
    LVL 33

    Expert Comment

    You have 2 SET which is incorrect.

    Author Comment

    hongjun, genius :o)

    LVL 6

    Expert Comment


    What is the Erorr Msg ???

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now