TZSQLite3PlainDriver.Open

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
mariuszekpl
Senior Boarder
Senior Boarder
Posts: 54
Joined: 30.09.2008, 10:59

TZSQLite3PlainDriver.Open

Post by mariuszekpl »

IS

Code: Select all


function TZSQLite3PlainDriver.Open(const filename: PAnsiChar; mode: Integer;
  var errmsg: PAnsiChar): Psqlite;
var
  Result0: Psqlite;
  Version: string;
  FileNameString: String;
begin
  Result0:= nil;
  Version := LibVersion;
  FileNameString := filename;
  if (Version > '3.2.5') then
    ZPlainSqLite3.sqlite_open(PAnsiChar(AnsiToUTF8(FileNameString)), Result0)
  else
    ZPlainSqLite3.sqlite_open(filename, Result0);
  Result := Result0;
end;
Should be

Code: Select all

function TZSQLite3PlainDriver.Open(const filename: PAnsiChar; mode: Integer;
  var errmsg: PAnsiChar): Psqlite;
var
  Result0: Psqlite;
begin
  Result0:= nil;
  ZPlainSqLite3.sqlite_open(FileName, Result0);
  Result := Result0;
end;
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi mariuszekpl,

Isn't this the remaining issue from post http://zeos.firmos.at/viewtopic.php?t=2115 ?
Can you please explain why the complex checking can be removed so easily without killing functionality on an old compiler?

I have no clue what happens exactly, so I'll accept about any reason you provide, but just give me one. Did you test this on D<2009 and D2009 with a SQLite version > 3.5.2? Maybe that's the best reason you can give ;)

Mark
Image
aducom
Zeos Dev Team
Zeos Dev Team
Posts: 67
Joined: 30.08.2005, 13:21

Post by aducom »

As of version 3.2.5 unicode filenames are supported in SQLite. Therefore the code should not be altered imho. This might be different for D2009 though.
mariuszekpl
Senior Boarder
Senior Boarder
Posts: 54
Joined: 30.09.2008, 10:59

Post by mariuszekpl »

It is true ?
I can't find old sqlite3.dll before 3.2.5
And i can't find it at www.sqlite.org
Locked