Problems inserting records

I am trying to “insert a database record” following the docs on the subject but the UI seems to have changed. On a folder when I try to add a server action, I can only: add a database connection, add a folder, rename, delete, collapse all, expand all. Where can I create a new Server Action?
Best.
Jay

Hi Jay,

Yeah, some things have recently changed. In your Server Connect Panel, click on API and then you can add your server connect actions.

You will probably need this tutorial as well.

https://docsdev.wappler.io/guides/using-globals-in-server-connect

OK, now following the same basic tutorial “insert a database record”, I get to the page 16 where I am suppose to find a “Generators” option, but in my menu, such option is not available. What is the problem now?
Best.
Jay

Are you using Bootstrap 5 or 4?

Generators are not yet added to Bootstrap 5. That is probably where the difference is.

Hi Brad,
I was using Bootstrap 5, I changed it to 4 and the Generator appeared. Thanks!
Then, in page 28 of the same doc, I assume that the “Server Connect form: serverconnectform…” is the equivalent of what appears in my screen “Form: serverconnectform1” See image below:

image

Next, in page 32 I selected the option of reset as it appeared in my actions screen, please see below:

Then, I opened a new window with the form, I fill it with data and get the following
Chrome developer tool error:

And, the data in the form is not inserted in the database. Please I would welcome your advise on what I may be doing wrong.

Best.

Jay

Just select the file name with the error:

to see the exact error. It’s all explained here:

OK, thanks. The error is as follows:

{

  • “status”: “500”,
  • “code”: “ECONNREFUSED”,
  • “message”: “connect ECONNREFUSED 127.0.0.1:9906”,
  • “stack”: “Error: connect ECONNREFUSED 127.0.0.1:9906 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)”

}

Any idea of what it can be? Thanks for your help.

Best.

Jay

What database are you using? What hosting type?
Something is not good in your target configuration.

Seems your database server is not running …

I have MySQL running on docker, please find below the inspect screen I get:

Best.

Jay

One error I found is that the Bootstrap 4 Form Generator is not picking up the fields it should. It is picking up fields from other tests I had in the past. Instead of picking the two (last_name and _first_name) as you can see from the input --> $:POST in the screen below:

I hope it helps.

Best.

Jay

Am I doing something wrong or is it a bug? I am repeating the same thing over and over again with the same results every time. Including with the new version 3.9.2-
Best.
Jay

OK, I finally made it work by changing to the default db database connection instead of the PrivatePlacement connection I had created. I am showing below the differences in the connections:

The one NOT working is as follows:

I hope it helps to clarify what is the correct way of doing it.

Best.

Jay

The docker database connections are generated the way that they should be - is internal within the same web server.

So changing those is just asking for troubles.

We actually limit changing in the recent updates just because of that.

Another important tip is to make sure you give unique names to each Database insert. Otherwise the system wil throw you a 500 error. In the window below I am naming the Database Insert as “insert_investor”