I’m having a little problem with a web app i am writing.
The web app is all lazy loading, if i need something i query the DB (mariaDB), and i found out, after the executable crashed several times, that i can only only do one query at the time using xojo build in functions.
To overcome this i have threads and Semaphore to ensure only one query at the time.
And my questions are those;
Is this a xojo limitation? And if yes is it 1 query per Sessions or per web app?
How to i overcome it?
Does other network functions have the same limitations?
Thank you in advance for you guidance!
I haven’t come across this problem with a mySQL server, however I would highly recommend each session has it’s own Database connection.
That is how it is implemented, a connection for a Session.
I think you have given me the answer.
I use a property in session to hold the DB connection. If two queries try to access it simultaneously then things will go wrong. I should make the db connection a variable if i want more than one query at the time. That should work, or am i wrong on this?
Same with PostgreSQL. We have an entirely thread-driven middleware app. Each thread gets a new connection to the database, then closes and discards it when done.
Thank you both for the help! Now i know what i did wrong-ish in my code.