Solved

wrong national (Norwegian) characters when importing dbf files into MS SQL Server

Posted on 2011-09-03
6
769 Views
Last Modified: 2016-02-23
Hi,

I have tried to buid an SSIS package importing dbf files into MS SQL server  database. I have problems with national characters. I use ADO Net data source with ODBC connector, I have defined DSN with uses Microsoft dbase driver. The resulting tables contain wrong charactes instead of national ones (Ø, Æ, Å). I have tried also FoxPro Ole DB driver. This one allows to force coding table ( which appears to be 1252) and results are correct, but it takes ages! to read files. I have also tried to read into MS Access 2010 database, errors are the same. The same errors when trying to open in excel.

I attach sample file.

PKPOLIKL.dbf.zip
0
Comment
Question by:kvilimas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 36479571
By default there are OEM encoding ("DataCodePage"="OEM", you should change it to ANSI (for Access 2010):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Xbase]
"DataCodePage"="ANSI"

0
 

Author Comment

by:kvilimas
ID: 36479598
Hi! Will this affect also how data are imported into sql server?
0
 
LVL 40

Expert Comment

by:als315
ID: 36479661
I've never tried to import DBF files directly to SQL, you can try.
If you link or import file to Access and then import from Access to SQL, all will be OK.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 40

Expert Comment

by:als315
ID: 36482454
Before Access 2007 this parameter  was in Jet path of registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase]
"DataCodePage"="ANSI"
May be it will work for SQL.
You can try to search in registry "Xbase" and "DataCodePage". By default there is "OEM"
0
 

Expert Comment

by:Bbase
ID: 41476722
Thank you for sharing this usefull information. One remark: changing "DataCodePage" to "ANSI" solves the problem for opening DBF files in Access 2010. Not in Excel 2010.

Is there a similar registry setting for Excel?
Many thanks.
Bbase
0
 
LVL 40

Expert Comment

by:als315
ID: 41476829
Sorry Bbase, as I know Excel can work only with OEM DBFs.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question