I'm trying to work with unixODBC and a SAP Hana database, and created a simple C program to INSERT/SELECT into the database. My problem is, if I use for example
SQLExecDirect(stmt, "SELECT * FROM NEWTABLE;", SQL_NTS);
while ((ret = SQLFetch(stmt)) == SQL_SUCCESS) {
...
}
It works perfectly, but if I do an INSERT statement like:
SQLExecDirect(stmt, "INSERT INTO NEWTABLE VALUES ('test');", SQL_NTS);
while ((ret = SQLFetch(stmt)) == SQL_SUCCESS) {
...
}
SQLFetch always returns SQL_SUCCESS, and the while loop never ends. Anybody has faced this issue? Is it some extra configuration needed that I'm missing?