Problems using SQL Queries within ButtonPushed callbacks

Hi all,
I am experiencing an unusual problem within MATLAB App Designer.
I have a button that, when pushed, retrieves information from a database.
Without the SQL query, the ButtonPushed callback functions as expected, but when I add the code to execute the query, the ButtonPushed callback gets executed twice.
I found a solution is to move the SQL query into a separate function and call that from the ButtonPushed callback, but I am wondering why having it directly in the callback function is an issue.
Thanks in advance,
-Mac

댓글 수: 1

Mac,
Can you provide a sample snippet of your push-button callback containing the SQL query code? This will help us to identify the problem.

댓글을 달려면 로그인하십시오.

 채택된 답변

Mac Catrambone
Mac Catrambone 2021년 3월 2일

0 개 추천

Solved!
There was an EditField that somehow got mapped to the ButtonPushed callback.
This was the cause of the double trigger.
Thank you.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by