Hi,
I have an requirnment for pushing real time data from Axapta Customer table to external system which have same database as oracle.
for example: In axapta if i insert an record in customer table same time it should also insert data in external system database using odbc . It is a real time pushing data using db link.
Pls help
current code: wrritten on customer table insert method : getting error cursor state
LoginProperty LP;
OdbcConnection myConnection;
Statement myStatement;
ResultSet myResult1;
ResultSet LocalResult;
Statement LocalStatement;
int RecCount=0;
str a;
;
super();
ttsbegin;
LP = new LoginProperty();
LP.setDSN("teststaging");
LP.setUsername("teststaging");
LP.setPassword("teststaging");
try
{
myConnection = new OdbcConnection(LP);
}
catch
{
PRINT("Check username/password.");
return;
}
LocalStatement = myConnection.createStatement();
LocalResult = LocalStatement.executeQuery(strfmt("insert into teststaging.ARtable(AR_CODE) values ('%1')",this.Custcode));
ttsbegin;
while(LocalResult.next())
{
a = LocalResult.getString(1);
BOX::info(a);
RecCount++;
}
ttscommit;
info(int2str(RecCount)+" Records are inserted.");