Dear All., I write a job for accessing oracle table through ODBC. I can read the real values. But when i want to read string values Ax automatically closed. Any one call tell me a solution for that. Its urgent.
static void ODBCCONNECT(Args _args) { LoginProperty loginProperty; ODBCConnection odbcConnection; Statement statement; ResultSet resultSet; OciConnection OciConnection; str ConnectionString; AAODBC table; str DSN ="AX2"; str UserName ="system"; str Password ="ax"; int i =0; ; ConnectionString=strfmt("DSN=%1;UID=%2;PWD=%3",DSN,UserName,Password); loginProperty = new LoginProperty(); Loginproperty.setOther(ConnectionString); try { odbcConnection = new ODBCConnection(loginProperty); if(odbcConnection) { statement = odbcConnection.createStatement(); Resultset = statement.executeQuery("Select * from test"); resultset.getMetaData(); while (Resultset.next()) { i++; info(strfmt('%1',i)); info(strfmt('Resultset %1', resultset.getReal(3))); info(strfmt('Resultset %1', resultset.getString(1))); } } } catch { error('Unexpected error'); } } Regards., Suneel _________________________________________________________________ New Windows 7: Find the right PC for you. Learn more. http://windows.microsoft.com/shop