+ Reply to Thread
Results 1 to 2 of 2

SQL Update in VBA

  1. #1
    Registered User
    Join Date
    03-08-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Angry SQL Update in VBA

    Hello all

    I have been working on an update querie in VBA to update my SQL 2005 server, but I can't seem to make it work, so I think I need a second set of eyes.
    Please Login or Register  to view this content.
    I keep getting the same error Incorrect syntax ner "=", debugging shows strSQL = Update tblAttendance_Count[][]Set userID= '31'[][]Set sDate='4/21/2010'

    I have never used SET in VBA before so I am not sure I am using it properly.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: SQL Update in VBA

    see: http://www.w3schools.com/sql/sql_update.asp

    In general terms: one SET command with fields being updated delimited by comma - ensure you add spaces between values / keywords as necessary

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1