Hello,
how can I use 'Microsoft ActiveX Data Objects 6.0 Library' in Navision? Where can I find a documentation about it?
I need to read data from Access-Tables.
And I have a specific question: How do I define a "stringformatenum" in nav?? Its the first parameter in the Recordset.GetString()-Function...
or is there another way to read data from rows/fields in a Nav table?
Thanks, Iris
0
Comments
The ADODB Object (as it is commonly known between developers) is quite easy and straight forward to do what you need.
Basically you need 4 objects (2 are common to any language, 2 are most common in NAV):
- Connection
- Recordset
- Fields
- Field
You must open a Connection in order to use a Recordset.
So the dataflow should be more or less like this:
- Open Connection
- Open Recordset
- Check if Recordset is not empty
- Iterate through Recordset
- Fields = Recordset.Fields;
- Field = Fields.Items(Name of Field)
- Field.Value holds the data for that field
- Close Recordset
- Close Connection.
Here is some fast example I could assemble. This probably is not very optimized but it's a starting point for your tests:
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com