Excel VBA Introduction Part 32 – ADO (ActiveX Data Objects) SQL Statements
The ADO Command object essentially allows you to write SQL statements directly into your VBA code and execute them on whichever database you’ve connected to – powerful stuff! This video focusses on the INSERT, UPDATE and DELETE statements to allow you to modify data based on information contained in your Excel workbooks. We’ll cover how to build dynamic SQL statements and how to avoid the main danger of dynamic SQL. You’ll also get an idea of how transactions work in databases, allowing you to revert your data back to a previous state if things go wrong with your code!