DatabaseConnector Compilation Error: cannot find symbol

0
Hi Guys, I've just added the DatabaseConnector module to my app and now I cannot build it. I get the following error: Buildfile: C:\Users\Administrator\Documents\Mendix\DSM-main_2\deployment\build_core.xml compile:     [javac] Compiling 14 source files to C:\Users\Administrator\Documents\Mendix\DSM-main_2\deployment\run\bin     [javac] C:\Users\Administrator\Documents\Mendix\DSM-main_2\javasource\databaseconnector\actions\ExecuteQuery.java:82: error: cannot find symbol     [javac]             this.jdbcUrl, this.userName, this.password, metaObject, this.sql, this.getContext());     [javac]                                              ^     [javac]   symbol: variable password     [javac] C:\Users\Administrator\Documents\Mendix\DSM-main_2\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\Administrator\Documents\Mendix\DSM-main_2\javasource\system\actions\VerifyPassword.java:37: error: cannot find symbol     [javac]         return user != null && Core.authenticate(getContext(), user, password);     [javac]                                                                      ^     [javac]   symbol:   variable password     [javac]   location: class VerifyPassword     [javac] 3 errors BUILD FAILED C:\Users\Administrator\Documents\Mendix\DSM-main_2\deployment\build_core.xml:29: Compile failed; see the compiler error output for details. Total time: 0 seconds   Does anyone know how to solve this?  
asked
1 answers
1

Hi Tanmay,

Since version 7.6 Mendix has added a method to their java API that makes the old way of connecting obsolete.

Core.dataStorage().executeWithConnections

https://apidocs.mendix.com/7/runtime/com/mendix/datastorage/DataStorage.html

answered