September 11, 2013

Connecting to Databases through X++ PART -II

Connecting to Databases through X++ PART -II


    ADO Connection:
ADO is a set of COM objects for accessing databases or data stores. In AX we have following Classes/Objects which help to implementing ADO concept.

Class Name
Description
Helps in establishing a connection to the target database.
Helps in executing a command (a Text type or a Stored procedure)
Stores the data
A collection of all fields in CCADORecordSet
A single field from the collection of fields
A class that helps in passing parameters that a command needs or demands

Here is an example:

static void dbCCADOConnection(Args _args)
{
    CCADOConnection connection = new CCADOConnection();
    CCADOCommand    ccADOCommand;
    CCADORecordSet  record;
    str connectStr = "Provider=SQLNCLI.1;Integrated Security=SSPI;"+
                     "Persist Security Info=False;Initial Catalog=AXDEVDB;Data Source= theAxapta";
    COM     recordSet;  /*This is required to call moveNext method to parse the record set. In AX 4.0 this method was there in the CCADORecordSet class but in AX 2009 this has been deleted*/
    ;
    // Executing a SQL Statement
    try
    {
        connection.open(connectStr);
        ccADOCommand = new CCADOCommand();
        ccADOCommand.commandText("Select * from CustTable where DataAreaId = ‘CEU’");
        ccADOCommand.activeConnection(connection);
        record = ccADOCommand.execute();
        recordSet = record.recordSet();
        while (!record.EOF())
        {
            info(any2str(record.fields().itemIdx(0).value()));
            recordSet.moveNext();
        }
    }
    catch
    {
        error("An Exception has occurred");
    }
    connection.close();
}





Previous Post:


-Harry

September 09, 2013

Dynamics AX 2012 Certification Exams Details- Part II


MB6-869: Microsoft Dynamics AX 2012 Development Introduction


Preparation materials

This Exam contains following topics
Understanding Dynamics AX 2012 Architecture (13 percent)
·      Identify key development features and functionality.
·         This topic may include: development workspace; IntelliMorph; MorphX; object-oriented design; navigation
·      Demonstrate understanding of the data architecture.
·         This topic may include: working with data in forms; sorting records; filtering records; finding records
·      Demonstrate understanding of architecture components.
·         This topic may include: layers; models; labels; Help system; reporting
·      Work with customization tools.
·         This topic may include: using MorphX to customize the user interface; using the X++ editor to develop customizations; identifying best practices; using the Type Hierarchy Browser and Type Hierarchy Context tools; using the reverse engineering tool
Managing the Data Dictionary (13 percent)
·      Work with MorphX, the Application Object Tree (AOT), and projects.
·         This topic may include: working with development projects; features of the AOT; Microsoft Visual Studio projects node; objects in the data dictionary; navigating the AOT and data dictionary
·      Work with tables and relations.
·         This topic may include: table structure and components; fields; field groups; indexes; delete actions; creating tables; creating relations; primary keys; foreign keys; surrogate keys
·      Work with data types and base enumerations.
·         This topic may include: primitive types; extended types; creating data types; using data types; creating base enumerations; using base enumerations
·      Work with maps and views.
·         This topic may include: map functionality; map advantages; view functionality; view advantages
Managing the User Interface (13 percent)
·      Work with menus and menu items.
·         This topic may include: creating and using menu items; menu functionality; creating menus
·      Manage forms.
·         This topic may include: data sources; design; document view; editing data in a form
·      Work with forms.
·         This topic may include: form types; list pages and list page metadata; working with the action pane; form parts
Managing Security (11 percent)
·      Work with role and task based security.
·         This topic may include: identifying key concepts, terms, and benefits; working with roles, process cycles, and duties; working with privileges, entry points, and permissions
·      Understand security concepts and settings.
·         This topic may include: default security settings; sample security settings
·      Work with XDS and server enforcement of security.
·         This topic may include: server-based code authentication; data security filters; org model; effective date
Working with X++ Control Statements (13 percent)
·      Work with variables.
·         This topic may include: declaration; simple data types; composite data types; arrays; containers
·      Work with operators.
·         This topic may include: assignment operators; arithmetic operators; relational operators; operator precedence
·      Work with conditional statements and loops.
·         This topic may include: if…else; ternary; switch; while loops; do…while loops; for loops
·      Work with communication tools.
·         This topic may include: print; boxes; infolog; dialog
Managing Objects and Classes (12 percent)
·      Work with classes, objects, and inheritance.
·         This topic may include: defining key attributes; method access control; extending a class; expression operators for inheritance; referencing object methods; method types; inheritance among tables
·      Work with scoping, events, and parameters in X++.
·         This topic may include: scope of objects within a class; events in X++
Accessing the Database (15 percent)
·      Retrieve data.
·         This topic may include: table buffers; select statements; field lists; while select statements; sorting; joins; cross-company data access
·      Manipulate data.
·         This topic may include: insert; update; insert_recordset; update_recordset; delete; delete_from; transaction tracking system
·      Work with queries.
·         This topic may include: executing a query; building a query; QueryBuildDataSource; QueryBuildRange
Managing Exception Handling (10 percent)
·      Work with exceptions and optimistic concurrency exceptions.
·         This topic may include: handling errors
·      Work with throw and try/catch commands.
·         This topic may include: handling errors

Previous Post:

Dynamics AX 2012 Certification Exams Details- Part I

-Harry