Reading Access DB from Navision

Is it possible to open a recordset in an Access Database from within Navision using MS DAO or ADO? If so. I would be glad to see some examples. //Lars

Yes it’s, a guy at my previous NSC did that using the ADO Automation. Sorry no sample code to provide you. ###### tarek_demiati@ureach.com

Lars, You should not have troubles with ADO in C/AL. Look at the example:

**Prerequisites:**
ODBC DSN='TST'
MS Access Database 'task.mdb'
MS Access Database Table 'Groups'
Table Field 'GroupID'
* * *
**VAR:**
OBJdbConnection Automation('Microsoft ActiveX Data Objects 2.6 Library'.Connection);
RSGroups Automation('Microsoft ActiveX Data Objects 2.6 Library'.Recordset)

**CODE:**
CREATE(OBJdbConnection);
OBJdbConnection.Open('TST','Admin','');

CREATE(RSGroups);
RSGroups.Open('Groups', OBJdbConnection);
RSGroups.MoveFirst;

IF NOT RSGroups.EOF THEN
  REPEAT
    MESSAGE('%1', RSGroups.Fields().Item('GroupID').Value);
    RSGroups.MoveNext;
  UNTIL RSGroups.EOF;

RSGroups.Close;
OBJdbConnection.Close;

CLEAR(OBJdbConnection);
CLEAR(RSGroups);

Regards, Yuri Pokusaev IBS, Senior Consultant NCPS, NCSD ypokusaev@yahoo.com +7(095)967-8080

Thank’s Yuri! //Lars