Why am I receiving the error "SQL error or missing database" when opening a model or using "Quick Insert" after adding a custom library in Simulink in MATLAB R2022b?
조회 수: 26 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2023년 12월 19일
답변: MathWorks Support Team
2024년 1월 3일
I have added a custom library to the Simulink library browser successfully, but now I am encountering an error every time I open a Simulink model or use Quick Insert (double-click on Simulink canvas), which no longer shows searchable blocks. This is the SQL error that indicates a missing database:
SQL error or missing database C:\Users\username\AppData\Local\Temp\__mw_qi_2460_mw__\__mw_resources_mw__\qi_db\IRYEXT00161_slblocks_master.db. (Expression tree is too large (maximum depth 1000))
I initially suspected this was caused by duplicated block names in my library, so to find the suspected culprit block, I am using "slblocksearchdb", but I still get the following error:
>> slblocksearchdb.trace(true);
>> slblocksearchdb.recreate;
Error using slblocksearchdb.recreate
SQL error or missing database
C:\Users\username\AppData\Local\Temp\__mw_qi_17416_mw__\__mw_resources_mw__\qi_db\IRYEXT00161_slblocks_master.db.
(no such table: BLOCKDETAILSFTS)
Additionally, my colleagues who are using the same library packages do not experience this error.
Why is my Simulink not working correctly after adding a custom library, and what could be causing this SQL error on my machine?
채택된 답변
MathWorks Support Team
2023년 12월 19일
As the issue is only persistent on your machine, it indicates there are outdated files in the "prefdir" and "tempdir" folders that are interfering with the proper functioning of the library. It is not related to block name duplication.
The solution is to rename the folders, or delete the contents of the folders returned by these commands in the MATLAB Command Window:
>> tempdir
>> prefdir
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!