Check account input with account from database sql.

0
Hi everybody! I want to check the account entered from the text box with the account in the sql database, how do I do that? I have tried using execute query in microflow to test but no success. Please help me! Thanks and best regard,
asked
1 answers
1

Hi Kien,

            If you want to connect with external databases, you need an JDBC url (Ex : jdbc:postgresql://127.11.0.0.1:5432/YourDBName)with your Database name. Provide your Database credentials Username and Password in the respective place. Create one String variable with your SQL query. Then map this Query string variable in SQL query section. Create one entity (Ex : Customer) with attributes what column data you mentioned in SELECT clause like (

SELECT CustomerName,CustomerID,CustomerAddress 

FROM Customer

WHERE UserName = ‘YourInputUserName’ and Password = ‘YourInputPassword’

).

When you execute the query, it will connect with your external database and fetch the data and it will create new objects of return type entity (Ex; Customer).

 If you want to execute SELECT clause queries, we need to use ExecuteQuery activity. INSERT,UPDATE and DELETE operations, we can go for Execute Statement activity. For your reference, I will share the Mendix documentation link. Which will helps you to understand clearly. 

 

https://docs.mendix.com/appstore/connectors/database-connector

 

Thanks and regards,

Vijayabharathi V

answered