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.
ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
I have searched and found that this issue is caused by running 32-bit driver in 64-bit environment.
So, what should I do? Any other way to read DBF file in C/AL Code?
Please help me. Thanks in advance.
Comments
NAV 2013 only runs on sql and not native server
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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.
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. Could you help me to solve this issue?
Thanks in advance
Johanna