/* Execute an SQL statement. Return a Cursor object if the statement is a query, otherwise return the number of tuples affected by the statement.  */
static int conn_execute(lua_State *L)
/* Execute an SQL statement. Return a Cursor object if the statement is a query, otherwise return the number of tuples affected by the statement.  */
static int conn_execute(lua_State *L)
{
		OCIHandleFree ((dvoid *)stmthp, OCI_HTYPE_STMT);
		return checkerr (L, status, conn->errhp);
	}
	if (type == OCI_STMT_SELECT) {
		return create_cursor (L, 1, conn, stmthp, statement);
	} else {
		int rows_affected;
		ASSERT (L, OCIAttrGet ((dvoid *)stmthp, (ub4)OCI_HTYPE_STMT,
			(dvoid *)&rows_affected, (ub4 *)0,
			(ub4)OCI_ATTR_ROW_COUNT, conn->errhp), conn->errhp);
		OCIHandleFree ((dvoid *)stmthp, OCI_HTYPE_STMT);
		lua_pushnumber (L, rows_affected);
		return 1;
	}
}