Hi, This is the first time I am trying to create something with Mendix. I am trying to use Database Connector to connect to external Database. I did following ExecuteQuery – I defined JDBC URL, username, password, sql and result set – as string I defined an entity to hold the result set. I am trying to execute query using microflow. I am getting following error and not able to proceed – [javac] C:\Users\khandelp\Documents\Mendix\ProgPlanning-main\javasource\databaseconnector\actions\ExecuteStatement.java:71: error: cannot find symbol [javac] return connector.executeStatement(jdbcUrl, userName, password, sql); [javac] ^ [javac] symbol: variable jdbcUrl [javac] location: class ExecuteStatement [javac] C:\Users\khandelp\Documents\Mendix\ProgPlanning-main\javasource\databaseconnector\actions\ExecuteStatement.java:71: error: cannot find symbol [javac] return connector.executeStatement(jdbcUrl, userName, password, sql); [javac] ^ [javac] symbol: variable userName [javac] location: class ExecuteStatement [javac] C:\Users\khandelp\Documents\Mendix\ProgPlanning-main\javasource\databaseconnector\actions\ExecuteStatement.java:71: error: cannot find symbol [javac] return connector.executeStatement(jdbcUrl, userName, password, sql); [javac] ^ [javac] symbol: variable password [javac] location: class ExecuteStatement [javac] C:\Users\khandelp\Documents\Mendix\ProgPlanning-main\javasource\databaseconnector\actions\ExecuteStatement.java:71: error: cannot find symbol [javac] return connector.executeStatement(jdbcUrl, userName, password, sql); [javac] ^ [javac] symbol: variable sql [javac] location: class ExecuteStatement [javac] 4 errors BUILD FAILED
asked
Paresh Khandelwal
2 answers
0
Are you sure you are using the right activity? The error points to ExecuteStatement (instead of ExecuteQuery which you should use for your select statement)
answered
Ruud Fleskens
0
After installing right jdbc driver I am not getting following error on execution of a Microflow –
com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException
at MyFirstModule.SearchFlow (JavaAction : 'Execute query')
Advanced stacktrace:
at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:389)
Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException
at MyFirstModule.SearchFlow (JavaAction : 'Execute query')