Hi all,
Using Free Pascal and XCode, i have two question :
First one :
Here is my code :
function TAccesBase.GetLibSequence(P_iSequence : integer; var P_sLibSequence : UnicodeString) : boolean;
var l_bOk : boolean;
{$IFDEF FPC}
l_sSQL : UnicodeString;
l_DB : TSQLite;
l_SL : Classes.TStringList;
{$ENDIF}
begin
l_bOk := false;
P_sLibSequence := '';
{$IFDEF FPC}
try
l_SL := Classes.TStringList.create;
l_DB := TSQLite.Create(UnicodeString(pAB_sFileName));
l_sSQL := 'SELECT Libelle FROM Sequence WHERE IdSequence = ''' + IntToStr(P_iSequence) + '''';
l_bOk := l_DB.Query(l_sSQL, l_SL);
if l_bOk = true then
P_sLibSequence := l_SL.Text; // the result is allways : 'Libelle Libx"
l_bOk := Length(P_sLibSequence) > 0;
freeandnil(l_DB);
freeandnil(l_SL);
except
on E:Exception do
begin
ShowMessage(E.Message);
l_bOk := false;
end;
end;
{$ENDIF}
Result := l_bOk;
end;
I get my libelle, every is ok except the string libelle is added before my libelle , why ?
In fact, he added in first the name of the column, how can i get it without it ?
2nd Question :
How can i get a blob contains a bitmap, i cannot used DB.Query to obtain it because the syntax is :
DB.Query(sql : string, result : string)...
Where can i find documentation about TSQLite ?
Sorry it made 3 questions

TIA