Re[2]: доступ к Access-овской базе
От: Cover Россия intence.ru
Дата: 09.07.03 14:04
Оценка:
Здравствуйте, GarryIV, Вы писали:

GIV>Hello, Cover!

GIV>You wrote on Tue, 08 Jul 2003 17:10:34 GMT:

C>> Вот интересно, у меня прога, которая читает данные из Access-овской

C>> базы. Я её специально переделывал, чтобы она в win98 работала с
C>> юникодом, а она мне пишет на файл, созданный в Access2k (который в win98
C>> прекрасно работает), что он в неизвестном формате, а если в Access-е
C>> пересохранить базу в "предыдущую версию", то юникодовские символы
C>> (иероглифы) в самом Access-е не показываются.

C>> Из-за чего моя прога может говорить, что неизвестный формат? Может чего

C>> поставить нужно?

GIV>Я не совсем понял стоит ли на той машине Access2000? Если стоит то хз. Иначе поставь MDAC поновее (я не помню именно в каком появилась эта поддержка то ли 2.5 то ли 2.6)


GIV>With best regards, Igor Evgrafov. E-mail: Don't reply use ievgrafo<AT>systems21{DOT}ru



Причину я нашел (совершенно случайно в MSDN):
[msdn]
This error message occurs because the MFC DAO classes that ship with Visual C++ 6.0 load DAO 3.5 (Dao350.dll) by default. DAO 3.5 uses Jet 3.5, which can only open Jet 3.5 format (or earlier) databases. Access 2000 creates Jet 4.0 format database files, which are unrecognizable to Jet 3.5. To successfully open an Access 2000 database using the MFC DAO classes, you need to use DAO 3.6 (Dao360.dll). DAO 3.6 uses Jet 4.0, which can open any available Access database format.
[/msdn]

Теперь у меня новая проблема.
В том же MSDN написано, как это исправить:
[msdn]
Modify the Daocore.cpp file in the MFC SRC directory. You will receive the following comment:


// Determine whether to use DAO 3.6, 3.5, or 3.0
// Use DAO 3.0 if DLL build and not built with MFC 4.21 or later
// Use DAO 3.6 if MFC 6.01 or later
// otherwise, DAO 3.5
Add the following lines:


#undef _MFC_VER
#define _MFC_VER 0x0601



Rebuild the library for the variant you need. For example, to build the static MFC library, debug version, non-Unicode, with no browser files use the following command at the command prompt in the MFC\SRC folder:



nmake DEBUG=1

for release:
nmake DEBUG=0

for unicode builds:
nmake DEBUG=1 UNICODE=1
nmake DEBUG=0 UNICODE=1



NOTE: You need to make certain that the compiler tools are in your path. If not, you may need to run the Vcvars32.bat file located in the Visual C++ \BIN folder. Also note that when you build these new versions of the libraries, they will be copied over the top of the existing ones in the MFC\LIB folder so you may want to save the old ones first.
[/msdn]
(к слову, я испольую MFC статично)
Так вот чего-то у меня не получается перекомпилить библиотеки так, как написано в msdn. Может кто знает, где можно достать уже перекомпиленные библиотеки под JET4? Или напишите по-подробнее, как эти библиотеки перекомпиливаются.
Если подробнее, ошибки возникают после запуска nmake DEBUG=0 UNICODE=1:
cl @C:\DOCUME~1\Admin\LOCALS~1\Temp\nma00244.
NMAKE : fatal error U1077: 'cl' : return code '0x80'
Stop.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.