How to get data from our default database in mendix

0
Please help me, how to get data from our default database in mendix using execute query
asked
4 answers
1

Not sure if this is where you are looking for, but I gues you want to see the actual database? If so, then: When running the application, go to the "Console" tab. In that tab you see an "advanced" option, click on it and this will give you the option to start the build-in database viewer.

 

answered
1

If you run the build-in database viewer you can run SQL query's.

answered
0
  1. The database backup from the Cloud instances can be retrieved in the Mendix Portal via the Operate -> Backups menu option in your project.
  2. Some database migration documentation in case you need to migrate the data.

answered
0

Instead of using 'Execute statement', you can use 'Execute query' which is able to convert the results into mendix objects (which you can use to store them into the Mendix database).

See also documentation regarding the Database connector options in the appstore: https://appstore.home.mendix.com/link/app/2888/Mendix/Database-Connector

 

  • Specific to the Execute query action:
    An entity in the domain model, to be used for the results of the executed query.
    Let's say that you want to execute a query like select name, number from stock. This query has two columns of type String and Integer respectively. In order to use the Execute query action, you have to add an entity in the domain model that has the same attributes as the columns in the query.

 

You cannot perform direct INSERT commands into the Mendix database. You will somehow need to extract the data from your default database and convert them into Mendix objects, then commit the Mendix objects to the database.

 

In addition, you should check out the Database replication module in the appstore which is also capable to map data from external databases into Mendix

https://appstore.home.mendix.com/link/app/160/Mendix/Database-replication

answered