Hi,
static void AlfasithOtherDBAccess(Args _args)
{
LoginProperty loginProp;
ODBCConnection conn;
Resultset resultSet, resultSetCount; // get record
Statement statement1, statement2; // Create SQL Statement
ResultSetMetaData metaData ; // get Record metadate like columnname.
RetailTillLayout RetailTillLayout;
int i = 1;
;
// Set Server Database
loginProp = new LoginProperty();
loginProp.setServer('DNWADY0046L'); // System or server name
loginProp.setDatabase('MicrosoftDynamicsAX'); // instance DB name like MicrosoftDynamicsAX_Live
// Create Connection and SQL Statement
conn = new ODBCConnection(loginProp);
statement1 = conn.createStatement();
resultSet = statement1.executeQuery("SELECT TOP 1 * from [MicrosoftDynamicsAX].[dbo].[RetailTillLayout]");
while (resultSet.next())
{
metaData = resultSet.getMetaData();
while (i)
{
info("Column Name :"+metaData.getColumnName(i)+ " Value = "+resultSet.getString(i));
i++;
}
}
}
Regards,
static void AlfasithOtherDBAccess(Args _args)
{
LoginProperty loginProp;
ODBCConnection conn;
Resultset resultSet, resultSetCount; // get record
Statement statement1, statement2; // Create SQL Statement
ResultSetMetaData metaData ; // get Record metadate like columnname.
RetailTillLayout RetailTillLayout;
int i = 1;
;
// Set Server Database
loginProp = new LoginProperty();
loginProp.setServer('DNWADY0046L'); // System or server name
loginProp.setDatabase('MicrosoftDynamicsAX'); // instance DB name like MicrosoftDynamicsAX_Live
// Create Connection and SQL Statement
conn = new ODBCConnection(loginProp);
statement1 = conn.createStatement();
resultSet = statement1.executeQuery("SELECT TOP 1 * from [MicrosoftDynamicsAX].[dbo].[RetailTillLayout]");
while (resultSet.next())
{
metaData = resultSet.getMetaData();
while (i)
{
info("Column Name :"+metaData.getColumnName(i)+ " Value = "+resultSet.getString(i));
i++;
}
}
}
Regards,
No comments:
Post a Comment