I would suggest looking into the Database
Connectivity Toolset. It has complete SQL functionality and uses ADO to connect to many types of databases. I have it and it comes with example programs which demonstrate how to write to and read from databases using SQL.
J.R. Allen