Database Toolbox is installed but MATLAB can't locate most SQL-related commands?
조회 수: 2 (최근 30일)
이전 댓글 표시
I installed Database Toolbox (v10.2) on MATLAB 2021b a few days ago, and can run the sqlite command, but that's about all—most of the SQLite commands listed on this page don't work. They trigger errors, e.g. "Unrecognized function or variable 'sqlwrite'." As you can see in the attached screenshot, MATLAB can't locate most of the commands (and can find execute, but I believe it's a different function than the one that's supposed to be used with databases).
Does anyone have any tips on how to troubleshoot this issue? I couldn't find any other questions about this, so I'm wondering if there was something else I was meant to install along with the Database Toolbox to get access to the full range of commands?
댓글 수: 0
답변 (1개)
Abhijeet
2023년 9월 6일
Hi Sofie,
I understand that you are getting "Unrecognized function or variable 'sqlwrite' error while using ‘sqlwrite’ function. 'sqlwrite' is a method of the 'connection' object and can only be called on an instance of 'connection' object.
Since the function exists within the class, MATLAB does not know of its existence without having access to an instance of the class and therefore throws the error you are seeing. Please ensure that you are creating a connection and passing it to the 'sqlwrite' function using ‘connection’ object.
Please follow the steps below to set up and connect to an SQL server:
I hope this information was helpful!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!