Use the SQLExecDirect function to prepare and execute a SQL statement.
Optionally, the statement can include parameters. The SQLExecDirect function takes a statement handle, a SQL string, and a length or termination indicator, which in this example below is a null-terminated string indicator.
This code fragment illustrates how to execute a statement without parameters.
See SQLExecDirect in the Microsoft ODBC Programmer's Reference.