Skip to main content

Posts

Showing posts with the label cycling Axapta Tips and trick

Get ODBC Type using axapta code

Get ODBC Type using axapta code ODBCConnection connection; SqlSystem sqlSystem = new SqlSystem(); LoginProperty loginProperty = sqlSystem.createLoginProperty(); Statement statement; ResultSet resultSet; SqlStatementExecutePermission sqlStatementExecutePermission; str sqlStatement; loginProperty = sqlSystem.createLoginProperty(); loginproperty.setOther(strfmt('dsn=abc;uid=xyz;pwd=dds')); connection = new ODBCConnection(loginProperty); statement = connection.createStatement(); sqlStatement = "select * from test "; sqlStatementExecutePermission = new SqlStatementExecutePermission(sqlStatement); qlStatementExecutePermission.assert(); resultSet = statement.executeQuery(sqlStatement); while(resultset.next()) { info(strfmt("%1 %2", resultset.getString(1), resultset.getString(2))); }