Query external database in mendix custom widget - Mendix Forum

Query external database in mendix custom widget

0

Hi i am going with custom widget , in that widget i need to get my SQL data and need to compare with the another data. for that i am using nodejs oracledb module to get my sql data and use in it in js file. but i dont kow how to link my nodejs file with my js file…

 

The below one is my node js code which is working fine externally if use in cmd ,

 

The below one is my dojo js file for my custom widget,

 

 

any leads will be much helpful , thanks in advance

asked
1 answers
1

Dear Narayana

Widgets are running in the client (browser) It is not designed for connecting directly to the databases. As it requires to expose the username and password publicly, making it impossible to protect your data.

Consider using a data base connector in the server and expose data via the model to the client.

cheers, Andries

answered