Home Matlab - [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
Reply: 0

Matlab - [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt

user836
1#
user836 Published in April 24, 2018, 6:19 am

I am running several SQL scripts from Matlab. For the last couple of months, there were no problems with it. However, since this week, I am starting to receive the following error:

Error using database.jdbc.connection/exec (line 53) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt

I have installed my ODBC driver on Matlab correctly, and I run the SQL queries as follows:

%  connect
conn = database('connectionName','user','password');

% I actually alter between two queries, but put the same here as an example
for i=1:2

   querynew  = "SELECT * FROM tbl";   

   results   = exec(conn, querynew); % the error is triggered here
   results   = fetch(results);
   Data      = results.Data;

end

close(conn)
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320377 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO