mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:49:20 +02:00
* fcl-db: tdbf: detect some files as DBaseIV instead of III given version signature $03,$8B regardless of language ID. Mantis issue #26332
git-svn-id: trunk@27993 -
This commit is contained in:
parent
c260879439
commit
39ae91a66f
@ -380,7 +380,7 @@ var
|
|||||||
|
|
||||||
version := PDbfHdr(Header)^.VerDBF;
|
version := PDbfHdr(Header)^.VerDBF;
|
||||||
FDbfVersion := xUnknown;
|
FDbfVersion := xUnknown;
|
||||||
// Some hardcode versions for Visual FoxPro; see MS documentation
|
// Some hardcoded versions for Visual FoxPro; see MS documentation
|
||||||
// (including the correction at the bottom):
|
// (including the correction at the bottom):
|
||||||
// http://msdn.microsoft.com/en-US/library/st4a0s68%28v=vs.80%29.aspx
|
// http://msdn.microsoft.com/en-US/library/st4a0s68%28v=vs.80%29.aspx
|
||||||
case version of
|
case version of
|
||||||
@ -389,14 +389,15 @@ var
|
|||||||
end;
|
end;
|
||||||
if FDbfVersion = xUnknown then
|
if FDbfVersion = xUnknown then
|
||||||
case (version and $07) of
|
case (version and $07) of
|
||||||
$03: //dbf without memo. Could be foxpro, too
|
$03: //dbf with/without memo. Could be Foxpro, too
|
||||||
if LanguageID = 0 then
|
if not(version in [$03,$8B]) {dbase IV, even with cleared language ID} and
|
||||||
|
(LanguageID = 0) then
|
||||||
FDbfVersion := xBaseIII
|
FDbfVersion := xBaseIII
|
||||||
else
|
else
|
||||||
FDbfVersion := xBaseIV;
|
FDbfVersion := xBaseIV;
|
||||||
$04:
|
$04:
|
||||||
FDbfVersion := xBaseVII;
|
FDbfVersion := xBaseVII;
|
||||||
$02 {FoxBase, not readable by current Visual FoxPro driver}, $05:
|
$02 {FoxBase, not readable by current MS Visual FoxPro driver}, $05:
|
||||||
FDbfVersion := xFoxPro;
|
FDbfVersion := xFoxPro;
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user