MS Access

Hi, how can I get data from an Access database in AXAPTA?

Hi You may want to use ODBC class. static void ODBCRead(Args _args) { LoginProperty LP = new LoginProperty(); OdbcConnection myConnection; Statement myStatement; ResultSet myResult; ; LP.setDSN("Northwind"); myConnection = new OdbcConnection(LP); myStatement = myConnection.createStatement(); myResult = myStatement.executeQuery("SELECT * FROM Customers"); while ( { info(strfmt("%1 %2", myResult.getString(1), myResult.getString(2))); } }

Hi nhormazabal, you can use CCADO set of classes. Here is a short example: CCADOConnection cn = new CCADOConnection(); CCADOCommand command = new CCADOCommand(); CCADORecordset rs = new CCADORecordset(); str Name; ;"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sample.mdb;Persist Security Info=False"); command.activeConnection(cn); command.commandText("SELECT Name FROM People"); rs = command.execute(); while (!rs.EOF()) { Name = rs.fields().itemName("Name").value(); info(Name ); rs.moveNext(); } cn.close();