Solved

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

Posted on 2011-09-03
6
764 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
  • 4
6 Comments
 
LVL 39

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 39

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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 39

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 39

Expert Comment

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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

930 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now