Recent

Author Topic: SQLite ftMemo error (SOLVED)  (Read 3888 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2092
    • Lazarus and Free Pascal italian community
SQLite ftMemo error (SOLVED)
« on: December 30, 2010, 08:16:56 am »
Code:

.
.
.
if (length(Memo_NotaRiga.Text)>0) then
begin
                              Q_Generica.Params.ParamByName('NOTABLOB').AsMemo:=Memo_NotaRiga.Text;

end;
Q_Generica.ExecSQL;



Error:
Project project1.exe raised exception class 'EDatabaseError' with message:
Parameter type ftMemo not supported


Why? Help me please
« Last Edit: December 30, 2010, 10:38:14 am by xinyiman »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2092
    • Lazarus and Free Pascal italian community
Re: SQLite ftMemo error
« Reply #1 on: December 30, 2010, 08:17:14 am »
This code function with firebird!
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2092
    • Lazarus and Free Pascal italian community
Re: SQLite ftMemo error
« Reply #2 on: December 30, 2010, 10:37:57 am »
Solved with:


if (length(Memo_NotaRiga.Text)>0) then
                              begin
                                   if Form1.ConnFB.Connected=TRUE then //se sono su un database firebird
                                      Q_Generica.Params.ParamByName('NOTABLOB').AsMemo:=Memo_NotaRiga.Text
                                   else //se sono su un database sqlite
                                       Q_Generica.Params.ParamByName('NOTABLOB').Text:=Memo_NotaRiga.Text;
                              end;
                              Q_Generica.ExecSQL;
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018