/* Fails with error message from ODBC Inputs: type: type of handle used in operation handle: handle used in operation  */
static int fail(lua_State *L, const SQLSMALLINT type, const SQLHANDLE handle)
/* Fails with error message from ODBC Inputs: type: type of handle used in operation handle: handle used in operation  */
static int fail(lua_State *L, const SQLSMALLINT type, const SQLHANDLE handle)
{
        ret = SQLGetDiagRec(type, handle, i, State, &NativeError, Msg, 
                sizeof(Msg), &MsgSize);
        if (ret == SQL_NO_DATA) break;
        luaL_addlstring(&b, Msg, MsgSize);
        luaL_putchar(&b, '\n');
        i++;
    } 
    luaL_pushresult(&b);
    return 2;
}