SYNOPSIS


int dbexecute(object *dbms);

The dbexecute() function executes a SQL command prepared via the dbprepare() function.

RETURN VALUES

The dbexecute() function returns the number of rows affected by the SQL command. In the event of a failure, an exception is thrown.

EXAMPLES

Example 1: Execute a SQL string using a specified DB cache and print all the results as character data:
char *cache = "test";
char *sql = "select * from foo";

dbm = dbacahe(cache);
dbprepare(dbm, sql, NULL);
dbexecute(dbm);
printf("<pre>\n");
while ((a = dbfetch(dbm)) != NULL)
{
    for (i = 0; i < sizeof(a); i++)
        printf(" %s ", (char *)a[i]);

    printf("\n");
}
printf("/<pre>\n");
dbclose(dbm);