This is the test connection made to decide on whether an import can be attempted. One problem we have is that error reporting on the php functions is non-existent. We are simply informed on whether it worked or failed. Not the reason for failure. Which means it is either the db name, user, password, host or table_prefix. Big help! We just do not know.
Having said that – looking at the code we can improve it a little (and I have already opened a ticket to get this done immediately) and at least make it possible to ascertain whether it is the connection or the attempted query. So that would narrow it down to either the database connection settings or – in this case, the table prefix/name.
If you would care to have the fixes so you can edit the copy you have I can paste them here for you to try out.
The other problem is that many forum software providers – and in my limited experience Invision are one of the worst at this – will change their database schema quite often which, of course, if we do not know about it can result in one of our import scripts becoming obsolete. Now I have not h4eard of Invision making any sweeping changes for at least 18 months or so so we should be OK but we always need to keep that in mind.