Skip to main content

Posts

Showing posts with the label Calling Sql Stored procedure through axapta code

Calling Sql Stored procedure through MSD axapta code

  Calling Sql Stored procedure through axapta code LogInProperty LogProp = new LogInProperty(); OdbcConnection Con1; Statement stmt1; ResultSet rs; ; LogProp.setServer("SeverName"); LogProp.setDatabase("DataBaseName"); LogProp.setUsername("sa"); LogProp.setPassword("123"); try { Con1 = new OdbcConnection(LogProp); } catch { info("Check username/password."); return; } stmt1 = Con1.createStatement(); rs = stmt1.executeQuery('EXEC [testSTRsp]'); while (rs.next()) { info(rs.getString(1)); }