Page 1 of 1

TZSQLite3PlainDriver.Open

Posted: 07.12.2008, 03:19
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;

Posted: 07.12.2008, 09:49
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

Posted: 07.12.2008, 22:45
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.

Posted: 09.12.2008, 00:01
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