How to copy a NAV Record to an ADO Record
MatteoSp
Member Posts: 4
In Navision 5, i need to copy all fields of a Navision record to a new ADO Record?
Is there a way to do this in a generic way?
thanks
m.
Is there a way to do this in a generic way?
thanks
m.
0
Comments
-
you can create a sql query with a select statement.
Select the Nav table you need to view.
The return will be a record set.0 -
many thanks, but consider this:
1) I need the generic way, so: is there a way to extract the table name from the NAV record?
2) When the data does not yet exist (for example when I'm about to insert the record), I still need to copy values
from the NAV record to the ADO record.
thanks again
m.0 -
you will need to loop through the NAV record and insert them one record a time.
NAVRecord.findset;
repeat
ADOCommand.execute('
Insert INTO SQL TABLE
(FIELD1,FIELD2)
VALUES
('+ NAVRecord.field1 + ','+ NAVRecord.Field2 + ')';
until NAVRecord.next = 0;
ADO is build around string and that is what you can pass back.0 -
Take a look into Recordrefs and Fieldrefs....they work a bit like ADO recordsets, making you able to loop through a NAV record.0
-
do you now where I can find some (good) docs about Recordrefs and Fieldrefs?0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
