Wappler Version: 5.0.2
Operating System: Windows 11 to develop (local) and Windows Server 2019 Standard (remote)
Server model: .NET
Database: MySQL/MariaDB
Notes:
Wappler is reporting that both database connections are working fine (one in Globals->Database Connections and the other in Database Manager-> direct connection)
In the error console, I can see the following error was created as the Inner Exception: āArithmetic operation resulted in an overflowā
Iāve spent days on this, including re-installing Wappler and restarting a new project, Iāve even tested on a different domain with a fresh database - all to no avail.
The database table has the following column datatypes:
testid - INT
name VARCHAR 50
email VARCHAR 50
created DATETIME
Iāve tried the form without that āDATETIMEā field included and I still get the same problem.
Wappler uses NodeJS internally for the database connections, on the server it uses the drivers that are installed there. With a Google search it seems there are many bugs with this error message, in most cases it seems to be related with the ODBC Driver, make sure you have the latest version installed on your server.
Iāve got the latest driver, Iāve also tried a variety of drivers, all give the same errors. It works fine on PHP server model, it also works fine on Dreamweaver (hate mentioning that here but its a fact). Wappler is also telling me the connections are āOKā.
If the error message was less ambiguous itād make it easier to debug, at the moment this is impossible to debug. Itās very frustrating as the records are being added to the database yet the 503 is still being generated and Wappler says the connections are fine when itās clearly not, surely this has to be a Wappler bug and not a driver fault?.
I will investigate this further, I know the error happens on the ExecuteScalar method. It doesnāt happen on other queries it seems, the insert does actually do 2 queries, first it does the insert statement and then it does a query to get the identity value. The query for that is SELECT LAST_INSERT_ID() and on executing this query it fails.
Can you tell me what kind of field the primary key is?
Iām not able to reproduce the problem, so it is probably some configuration or driver problem. The error is very generic and difficult to determine what the exact cause is.
It appears it wasnāt the ODBC driver but the 32bit applications fix that you mentioned which solved this issue.
Enabling 32-bit applications to True on the application pool of the site in question fixed the problem. Phew.!
Iāve carried out some basic testing and everything is now working exactly as it should - thank you for taking the time to look into this. Iām sure this will also help others out there so all this work from both of us wasnāt in vain.
Right, Iām off now to lock myself in my office and get cracking with some codeā¦