|   | ![[ Previous ]](navbprev.gif)  ![[ Contents ]](navbhome.gif)  ![[ Index ]](navbhelp.gif)  ![[ Next ]](navbnext.gif)  | 
    int Ns_DbExec (
    Ns_DbHandle *handle,
    char *sql
    );
The Ns_DbExec function executes the specified SQL command on the specified database connection. Ns_DbExec returns one of the following status codes:
| if the SQL command is DML (Data Manipulation Language) or DDL (Data Definition Language) | |
| if the SQL command will return rows (such as a SELECT command) | 
This function allows you to write a true ad hoc query tool and process SQL statements without knowing ahead of time if they return rows or are DDL or DML statements.