Consulting

Results 1 to 5 of 5

Thread: Update excel record to existing DBtable

  1. #1
    VBAX Regular
    Joined
    Oct 2009
    Posts
    14
    Location

    Angry Update excel record to existing DBtable

    Hi, can any one help ?

    i would like update my excel record into my database.i'm using this code but is not working. any advice make it work ?

    sqlStatement = "Update TestDB set 2009-11-Wk1 = Select E:E From [insert$]"

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Is this trying to insert multiple records at once, or one multi-column record?

    What does the table definition look like?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Oct 2009
    Posts
    14
    Location
    trying to update multiple records at once into my existing database. my existing database, there is data in it. i just wanted to update multiple record at once. i cant use insert statement because it will look like fig 1, only use update statement. the actual result will look like figure 3

  4. #4
    VBAX Regular
    Joined
    Oct 2009
    Posts
    14
    Location
    figure 3

  5. #5
    VBAX Regular
    Joined
    Oct 2009
    Posts
    14
    Location
    Hi, i'm trying to update using this statement but its not working.

    "Update TestDB SET "
        sqlStatement = sql & "2009-11-Wk1 = '" & Worksheets("Forecast").Range("E2:E6").Value"' "

Posting Permissions

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