Axapta: Get data from Database by SQL
You can copy it to a job: LoginProperty loginProperty = new LoginProperty(); ODBCConnection con; Statement stmt; str sqlString, result; ResultSet resultSet; ; loginProperty.setServer('servername'); loginProperty.setDatabase('DB name'); loginProperty.setUsername('username'); loginProperty.setPassword('pwd'); con = new ODBCConnection(loginProperty); sqlString = "select * from Address" ; stmt = Con.createStatement(); resultSet = Stmt.executeQuery(sqlString); resultSet.next(); result = resultSet.getString(1); if (result) { info(result); } else { info( "No record! " ); } 来源: https://www.cnblogs.com