Read DBF File in NAV 2013 R2

johanna
Member Posts: 369
Dear all,
I need to read dbf file in NAV 2013 R2.
I used C# class library and using DotNet variable to call the function. But, unfortunately I got error like below.
So, what should I do? Any other way to read DBF file in C/AL Code?
Please help me. Thanks in advance.
I need to read dbf file in NAV 2013 R2.
I used C# class library and using DotNet variable to call the function. But, unfortunately I got error like below.
I have searched and found that this issue is caused by running 32-bit driver in 64-bit environment.ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
So, what should I do? Any other way to read DBF file in C/AL Code?
Please help me. Thanks in advance.
Best regards,
Johanna
Johanna
0
Comments
-
What is a DBF File? Do you mean FDB file?
NAV 2013 only runs on sql and not native server0 -
The Microsoft Access dBASE Driver does not do the trick?
As a rather dirty alternative: If you don't need any memo fields you can treat the dbf-file as a fixed length text file. Skip the header first, then Watch out for the very first character in each line. Skip the line if it is not a space character. It is used to mark deleted records. You can get the field lengths from the information in the header and by looking at the data in some text file viewer.0 -
In earlier NAV versions, I've used Excel automation to read the contents of a MS Access database file. You might see if that still works.There are no bugs - only undocumented features.0
-
Dear ara3n,
Thank your for your response. DBF File is a Fox Pro Database File. It is not a FDB (Native Server Database) file.
Dear vaprog,
I could not use the Microsoft Access dBASE Driver because there is an error "Data source name not found and no default driver specified". Thank you for your suggestion to treat the dbf-file as a fixed length text file. But, in C/AL Text Variable only has length 1024. How if the data has length more than 1024?
Dear bbrown,
Thank you for your response. Now I try to use DB Viewer 2000 to convert DBF to XML first. With DB Viewer 2000, I can run command in command prompt to convert DBF to XML. In C/AL Code, I have successfully create automation using Windows Script Object Model to run the command prompt from Navision. But, I want to do this as recurring job in Job Queue. When I try to run the codeunit in Job Queue, there is an error like below.Microsoft Dynamics NAV
Microsoft Dynamics NAV Server attempted to issue a client callback to create an Automation object: 72c24dd5-d70a-438b-8a42-98424b88afb8 (CodeUnit 50004 tes export dbf to xml). Client callbacks are not supported on Microsoft Dynamics NAV Server.
OK
Thanks in advanceBest regards,
Johanna0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions