I’ve been working fine without any issues with targets local, Staging and Live and I am using Environmental variables to set the details of the Database.
Whilst on Local, all of a sudden, I got a message when on Target (local):
I am definitely on Local. Strange because it’s been working fine without issues. Not sure if it’s a bug or something I did because all of a sudden it came up after weeks of no issues. I had to go back to Database manager and manually enter in the Local DB details, even though they were set in the global Environment parameters.
It’s not a bug, just implemented a little illogically!
If I can store the variable in DEV, Production etc. mode, why can’t you use it in DEV mode in the “direct connection”!? I do not understand it entirely…
why make it simple when you can make it complicated
Nothing illogical here, the direct connection is not controlled by the target you are on.
In what cases and for what purposes you would need the direct connection to change per target?
there you can discuss for a long time what is logical and what is not
In dev I need the direct connection for table contents etc. for production I only need the ENV variables.
It’s just confusing when wappler automatically creates a direct connection, filled with the ENV variables that I have stored. Why is Wappler doing this if I have to put it in a fixed place anyway!?
it would be better if Wappler simply left out the information in the direct connection, or if what is stored in the ENV simply entered the values automatically.
Would be a suggestion for improvement.
Just turn off the direct connection checkbox when creating the server connect connection.
So can you please just provide an example of when and what for you would need the direct connection to the db to change per target?
With database manager you work on your dev database. Add data, structure etc. When you change your target you apply the changes to your target from within the database manager without the need to enter new credentials per each target.
For nodejs there is no such a switch indeed and the direct connection is always created.
You just need to go to direct connection after you create the server connect one and enter the direct connection details there.
understood everything… and now we come back to my starting point… but let’s leave that… I delete the automatically stored variables in Node.JS and supplement them with the values of my stored ENV
Hi @Teodor, I a bit confused, does Wappler require direct connection? I have the ENV variables all inputed and they worked great for each target, but why would it all of a sudden start displaying my original error about no connection define (and yes I am on local).
To resolve the issue I had to go to “Database Manager” (which I don’t use because I do everything in NaviCat), and enter my local Db settings manually in the Direct Database Connection.
Just need to confirm if that is what is required @Teodor
I have exactly the same problem, I don’t work with the Wappler direct connection but wappler needs it. To get data fields etc. I only use Navicat. Sometimes I also use existing databases where I don’t have to change anything in the database… Wappler always needs a direct connection here too, without which Query Builder would not work
Had this same issue a couple of days ago. It was working fine for ages, then it suddenly required me to enter the database details in the database manager, which I also don’t use. No idea why it suddenly started to require it.
It’s possible I might have had the database in the database manager all along, and I just forgot since I never go to that tab, but if this was the case it deleted itself after updating, and I was required to enter it again.