AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Wednesday, August 20, 2008

Codepage to import dbf files

English/Dutch speaking people should be happy that they do not need to know about codepage. But we, Russian programmers, very good know what it means. The problem that there is one kind of codepage in MS-DOS, and different - in Windows. You can write text file in notepad, and then your can’t read it in MS-DOS – Russian characters have different ascii codes.

DBF files were originally encoded in OEM (MS-DOS), but now can be also encoded in ANSI (Windows), so when you read dbf file from Access (import or link) you have to use proper code page. The only way (as I know) to change it - is to set registry key DataCodePage:

Access 2000-2003 (Jet 4):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Xbase]

Access 2007:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Access Connectivity
Engine\Engines\Xbase]

Possible values can be ANSI or OEM.

Of course, you need to have enough permissions to do so, plus keep in mind that you also change it for other users logged to this PC. And you have to restart Access in order new option take place. VB 6 help states that there is an option to set code page to local user, but I have not succeeded with it...

Labels: , ,

Tuesday, August 12, 2008

Image magic with ImageMagick

Recently I made an activex control to measure PDF floor plan (see below). The most difficult thing was to load PDF in picturebox. Fortunately I found ImageMagick library, which can not only convert almost any graphic file to another, but also process images whatever way you like: resize, rotate, add shapes, animate, special effects, etc, ect. Very cool staff, check it out!

PDFImageRuler

Technorati tags: ,

Labels: