VBA Update from Excel to SQL Table Contents.

  • Hi.



    I currently have a VBA Script that will create new records within a SQL table directly from excel.
    What I was hoping if there was a way to modify the below so it can change from a create to a modify/update of exisitng records in the SQL table.
    The unique key will be PP_REFERNCE in all cases
    So for example what the front end user will do is populate the PP_REFERENCE ID in cell A2 and then update the cells that they want changed in the SQL table.


    PP_REFERENCE DIRECTOR_NAME DIRECTOR_STATUS
    1234 DAVE APPROVED
    4567 MARK PENDING

    So what ever was in DIRECTOR_NAME before will now be replaced by the above from excel in the existing SQL table against the PP_REFERENCE


  • Your post does not comply with our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.


    Post a link to any other forums where you have asked the same question.


    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.


    Go to https://www.excelguru.ca/content.php?184 to understand why we ask you to do this.


    I have added the crosspost reference for you today. Please comply with this and all our rules in the future


    https://www.mrexcel.com/board/…l-table-contents.1118903/

    https://chandoo.org/forum/thre…sql-table-contents.43322/