필터 지우기
필터 지우기

Java exception using runsqlscript function

조회 수: 1 (최근 30일)
Allan Brett
Allan Brett 2019년 10월 17일
답변: Allan Brett 2019년 10월 21일
I am trying to run a mysql query using the Matlab "runsqlscript" function. I am calling it as follows:
results = runsqlscript(connL,'Query3.sql');
When I do so I receive the error:
Error using database.jdbc.connection/runsqlscript (line 168)
Java exception occurred:
java.lang.NullPointerException
at com.mysql.cj.jdbc.result.ResultSetImpl.getMetaData(ResultSetImpl.java:1074)
at com.mathworks.toolbox.database.fetchTheData.getTheMetaData(fetchTheData.java:177)
I am able to connect to the database through the Database Explorer, and running "isopen" on the connection "connL" returns 1. I am running Matlab2019b. This code returned no error in Matlab2016b.

채택된 답변

Allan Brett
Allan Brett 2019년 10월 21일
Answer my own question. Although it will not tell you, runsqlscript has been replaced by executeSQLscript.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by