Calling a stored procedure

Here is a piece of code to execute a stored procedure thru Axapta

static void storedProcedure(Args _args) {   LogInProperty Lp = new LogInProperty; OdbcConnection myConnection; Statement myStatement; ResultSet myResult; ;

LP.setServer("SeverName"); LP.setDatabase("DataBaseName"); Lp.setUsername("sa"); Lp.setPassword("sa");

try {       myConnection = new OdbcConnection(LP); }   catch {       info("Check username/password."); return; }

myStatement = myConnection.createStatement; myResult = myStatement.executeQuery('EXEC [inventtablesp]');//stored procedure name while (myResult.next) {       print myResult.getString(1); }   pause; }

REGARDS SREENATH REDDY