Re: Arduino IDE and MYSQL_Connector library
The connector was written for very small-ish queries due to the very limited memory on most Arduino boards.
That said, the size of the data returned is currently set to a max of 256 bytes/chars. This is defined in MySQL_Packet.cpp @ line # 99. Change this:
buffer = (byte *)malloc(256);
...to whatever size you need to fetch an entire row from the table. However, be forewarned that if your Arduino doesn't have enough memory, making this buffer larger can cause stability issues.
After changing the value, check the build report in the Arduino IDE. You want at least 600 bytes of program memory free after compilation. Any less than that and you will need to use an Arduino board with more memory.
Subject
Views
Written By
Posted
5961
May 08, 2019 10:24AM
Re: Arduino IDE and MYSQL_Connector library
923
May 13, 2019 10:01AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.