Hi all,
This is my first question – please accept my apologies if I format incorrectly.
I call the below code in an infinite loop which runs smoothly for the first ~200 iterations then catches the "Undefined function 'fetch' for input arguments of type 'struct'." error. It is worth noting that in between each iteration I open and close several other tables within the same ODBC connection before reconnecting to this one.
What has me confused is that it runs as it should for the first few hundred iterations. My hunch is that one connection may not close properly but Im not certain.
setdbprefs('DataReturnFormat', 'cellarray');setdbprefs('NullNumberRead', 'NaN');setdbprefs('NullStringRead', 'null');conn = database('ACCESS DB', '', '');curs = exec(conn, ['SELECT TABLE1.ID_DB'... ' FROM TABLE1 ']);curs = fetch(curs);close(curs);close(conn);
Thanks in advance for any help!
Best Answer