Tuesday 2 October 2012

Other Databse Connection using Ax 2009

hi friends,

Connection with other database can be established from Ax.

This database may not have connection with the database you are using.

By using ODBCConnetion(Other DataBase Connection) you can use it.

I have given a sample code and example of it.

static void dbODBCConnection(Args _args)
{
LoginProperty loginProp;
ODBCConnection conn;
Resultset resultSet, resultSetCount;
Statement statement1, statement2;
;

loginProp = new LoginProperty();
loginProp.setServer('172.16.0.999');
loginProp.setDatabase('AxDynamics2009RND');


conn = new ODBCConnection(loginProp);

statement1 = conn.createStatement();
resultSet = statement1.executeQuery("SELECT * from Attandance");

while (resultSet.next())
{
info(resultSet.getString(2));
}
}


happy daxing,

Vivek Chirumamilla

No comments:

Post a Comment