Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-03

TSQLQuery.ParamCheck

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Kapibara Pas

Hi there! This is my first posting on the mailing list. Thank you for your work on Lazarus!!

I have a question:

An earlier revision of Lazarus had the ParamCheck property implemented for SQLQuery. In the latest trunk that property is gone and all code removed from SQLdb.pas Could someone fill me in on that, and if it will be back in later versions?

Thing is, I created a parameter at designtime from ObjectInspector and assigned a value to  doesnt work for me without ParamCheck:=false. The compiler complains: "parameter not found".

Perhaps there is a workaround?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140301/aa764b51/attachment.html>

Reply by email

Antonio Fortuny
to Kapibara Pas

Le 01/03/2014 20:12, Kapibara Pas a ?crit :

Show quoted text 13 lines
Hi there! This is my first posting on the mailing list. Thank you for your work on Lazarus!! I have a question: An earlier revision of Lazarus had the ParamCheck property implemented for SQLQuery. In the latest trunk that property is gone and all code removed from SQLdb.pas Could someone fill me in on that, and if it will be back in later versions? Thing is, I created a parameter at designtime from ObjectInspector and assigned a value to doesnt work for me without ParamCheck:=false. The compiler complains: "parameter not found".

You could use ParseSQL property instead.

Antonio.

Show quoted text 10 lines
Perhaps there is a workaround? -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

---
Ce courrier ?lectronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com

Reply by email

Michael Van Canneyt
to Antonio Fortuny
Antonio Fortuny wrote 16 lines
Le 01/03/2014 20:12, Kapibara Pas a ?crit : > Hi there! This is my first posting on the mailing list. Thank you for your > work on Lazarus!! > > I have a question: > > An earlier revision of Lazarus had the ParamCheck property implemented for > SQLQuery. In the latest trunk that property is gone and all code removed > from SQLdb.pas Could someone fill me in on that, and if it will be back in > later versions? > > Thing is, I created a parameter at designtime from ObjectInspector and > assigned a value to doesnt work for me without > ParamCheck:=false. The compiler complains: "parameter not found". You could use ParseSQL property instead.

The ParamCheck is not removed, it is still there ?

araminta: >grep -i -n ParamCheck sqldb.pp
288:    FParamCheck: Boolean;
328:    Property ParamCheck : Boolean Read FParamCheck Write FParamCheck default true;
344:    Property ParamCheck;
382:    function GetParamCheck: Boolean;
390:    procedure SetParamCheck(AValue: Boolean);
487:    Property ParamCheck : Boolean Read GetParamCheck Write SetParamCheck default true;
544:    Property ParamCheck;
744:  if not ParamCheck then
886:  FParamCheck:=True;
1796:function TCustomSQLQuery.GetParamCheck: Boolean;
1798:  Result:=FStatement.ParamCheck;
2257:  If ParamCheck and Assigned(FDataLink) then
2433:procedure TCustomSQLQuery.SetParamCheck(AValue: Boolean);
2435:  FStatement.ParamCheck:=AValue;
2567:  FQuery.ParamCheck := false; // Do not parse for parameters; breaks use of e.g. select bla into :bla in Firebird procedures

Michael.

Reply by email

Kapibara Pas

Thanks for the replies, its solved now. The property ParamCheck doesnt exist in FPC 2.62.

So I just recompiled Lazarus 1.2RC2 with FPC 2.71 (make clean bigide) and restarted Lazarus. Voila: ParamCheck shows up!

Btw, three places in Registersqldb.pas that has to do with MYSQL56 was necessary to comment out:
registersqldb.pas(91,5) Fatal: Can't find unit mysql56conn used by registersqldb
Fatal: Compilation aborted

After fixing that, Lazarus is running great. But whats up with mysql56conn?

(System is 64bit Win8)

FPC 2.62 SQLdb.pp - 2289 lines of code
FPC 2.71 SQLdb.pp - 2829 lines of code

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140303/2b814ab9/attachment.html>

Reply by email