Re: [Lazarus] TSQLQuery.ParamCheck

2014-03-03 Thread Antonio Fortuny


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 it at runtime. That doesnt work for me without 
ParamCheck:=false. The compiler complains: parameter not found.

You could use ParseSQL property instead.

Antonio.


Perhaps there is a workaround?



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
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



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TSQLQuery.ParamCheck

2014-03-03 Thread Michael Van Canneyt



On Mon, 3 Mar 2014, Antonio Fortuny wrote:



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 it at runtime. That 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.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] trunk IDE now uses the project's compiler for code navigation

2014-03-03 Thread Mattias Gaertner
Hi,

Short:
Code navigation now works correctly when using another compiler in the
project different from the default compiler under Tools - Options.

Please test.

Long:
Code navigation needs the macros and search paths of the current
compiler. The settings are fetched by running the compiler with
parameter -va.

Formerly the IDE only asked the default compiler from Tools -
Options with the project's target OS and CPU for settings.

The trunk 1.3 IDE now asks the compiler of the project's
compiler options. It recognizes a compiler if its name is fpc.exe or
ppc*.exe (*nix: fpc or ppc*). Otherwise it uses the default compiler.

That means code navigation now works correctly when switching the
compiler via build modes or when loading a project using another
compiler.

You can pass the select options -Xp and -V via the Project - Compiler
Options - Other - Custom options.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Fatal: Compilation aborted

2014-03-03 Thread FreeMan
Did you check my install and update script? I was send one or two 
message before. Has it any error or wrong command?
2.6.2 last stable and download link in script, link remarked, manual 
download it before run script, and save thats under stable folder and 
use that from disk via dpkg -i.  I Looked on wiki and froum, always 
say first step install last stable fpc, in my script same.
If team say do not use svn version, we are not support it, okey. But, if 
say we need for tester, please tell us how to install and update rule or 
script etc.


just for example:
 http://web.firebirdsql.org/download/snapshot_builds/linux/fb2.5/
this is firebird daily snapshot folder, I'm use 
FirebirdSS-2.5.3.26747-0.amd64.tar.gz 
http://web.firebirdsql.org/download/snapshot_builds/linux/fb2.5/FirebirdSS-2.5.3.26747-0.amd64.tar.gz 
download it, open tar any folder, and execute install.sh


Thank you

02-03-2014 13:11 tarihinde, Sven Barth yazdı:


Because the ONLY guaranteed and supported way to compile a trunk 
compiler is the latest release which in this case is 2.6.2 (or by 
using a compiler of the exact same svn revision that you want to 
compile). If you don't follow this then you're left on your own. There 
won't be any support from us if you don't use the latest release 
compiler for bootstrapping.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Fatal: Compilation aborted

2014-03-03 Thread Sven Barth

Am 03.03.2014 11:51, schrieb FreeMan:
Did you check my install and update script? I was send one or two 
message before. Has it any error or wrong command?
I did not read any of the scripts you sent. I simply looked at the 
output you posted, recognized that you use the development compiler to 
compile a new version of the development compiler and this rang all my 
alarm bells.
2.6.2 last stable and download link in script, link remarked, manual 
download it before run script, and save thats under stable folder and 
use that from disk via dpkg -i.  I Looked on wiki and froum, always 
say first step install last stable fpc, in my script same.
You don't seem to specify the FPC to use. So if you now have your 
/opt/freepascal/2.7.1/bin in PATH then the 2.7.1 compiler will be used 
which is wrong. So explicitely specify the compiler to use with the make 
option FPC=/usr/bin/fpc (or whereever it is in your system). Check 
beforehand though whether fpc -iV returns 2.6.2 instead of 2.7.1 (it 
might be that the 2.6.2 compiler driver fpc nevertheless finds the 
2.7.1 compilers ppcXXX). If it uses the wrong compiler then you should 
at best remove the /opt/freepascal/2.7.1/ directories from path...


Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What GetChildParent does in designer and reader?

2014-03-03 Thread Fabio Luis Girardi
Hi Mattias!!

Revision 44299 is related with this?


The best regards


2014-02-28 7:56 GMT-03:00 Mattias Gaertner nc-gaert...@netcologne.de:

 On Fri, 28 Feb 2014 01:47:38 +0100
 Hans-Peter Diettrich drdiettri...@aol.com wrote:

 [...]
  Component DragDrop operations

 There is no drag when adding a component to a form.

 Mattias


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TSQLQuery.ParamCheck

2014-03-03 Thread 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


 
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] free Pascal versions

2014-03-03 Thread Nikolay Nikolov

On 03/03/2014 03:21 PM, Malcolm Buckingham wrote:
I've not tried it  but this looks like it might be what you are 
looking for
http://math.ubbcluj.ro/~sberinde/wingraph/ 
http://math.ubbcluj.ro/%7Esberinde/wingraph/



Or ptcgraph, which is included in FPC and runs on linux as well as windows.

Nikolay
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] free Pascal versions

2014-03-03 Thread Chris Kelling
Jim,

If you want to use the Lazarus IDE to write code as opposed to the FPC IDE, 
when you open a new project, when asked what type select either program or 
console program as opposed to application. 

Chris
 Everything at or below the line is a signature, not to be confused 
with the body of the email above. Sorry about the last signature text that 
seemed to have some people questioning my sanity. 

We are what we repeatedly do. Excellence, then, is not an act, but a habit.

-Aristotle




 From: JIMB [mailto:wand...@ntlworld.com] 
 Sent: 03 March 2014 12:24
 To: lazarus@lists.lazarus.freepascal.org
 Subject: [Lazarus] free Pascal versions
 
 Hi,
  
 Not sure if this is the appropriate place to send this enquiry, maybe some 
 one will guide me!
  
 I used Borland T Pascal for many years and later on Delphi.  Although I have 
 good training in Object oriented design and implementation, I have NOT had 
 many occasions where it was actually needed. Much of my stuff is just number 
 crunching and some graphic output, (7 colour is fine).
  
 I am struggling to make Lazarus do the stuff I want; a great deal of the 
 Lazarus power just confuses a simple process. Basically I need a replacement 
 for Borland Pascal 7. I do, however, like the Lazarus IDE.
  
 Any ideas what I which way I should go, and where will I see any replies to 
 this email, if there are any?
  
 Best wishes,
 Jim
  
 Jim Barr
  
 Best is the enemy of good enough
  
  
 Barrs law of recurcive futility:-
  
   If you're smart enough to use one of these.
   .you can probably manage without one
  
 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Fatal: Compilation aborted

2014-03-03 Thread FreeMan

Hello Sven,
I'm writeing my results, desktop is my computer name
desktop:/$ fpc -iV
2.7.1

desktop:/$ ppcx64
Free Pascal Compiler version 2.7.1 [2014/03/03] for x86_64
.

desktop:/$ echo $PATH
/opt/freepascal/2.7.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

desktop:/$ sudo find / -name fpc
/bin/fpc
/opt/freepascal/2.7.1/lib/fpc
/opt/freepascal/2.7.1/bin/fpc
/opt/freepascal/2.7.1/utils/javapp/src/fpc
/usr/lib/fpc

desktop:/$ sudo find / -name ppcx64
/opt/freepascal/2.7.1/lib/fpc/2.7.1/ppcx64
/usr/bin/ppcx64-- this is link

/usr/lib/fpc -- fpc is folder and link to /opt/freepascal/2.7.1/lib/fpc
in /opt/freepascal/2.7.1/lib/fpc folder has 3 folder
/2.6.0 -- this folder is empty, and 
ftp://ftp.freepascal.org/fpc/snapshot/v27/x86_64-linux/fpc-2.7.1.x86_64-linux.tar.gz; 
created, after untar this folder

/2.7.1
/lexyacc

sudo dpkg -i fpc_2.6.2-0_amd64.deb
sudo dpkg -i fpc-src_2.6.2-0_amd64.deb

after this command I looked in /usr/bin/ folder:
just ppcx64 link was there and this files was there fp, fpc, 
fpclasschart, fpcmake, fpcmkcfg, fpcres, fpcsubst, fpdoc, fppkg, fprcp
 after my installation script: ppcx64 link was there, I made it, other 
files links in /bin folder, I'm not made after installation



after my installation script: On any folder and vithout root user 
permissions, from console, fp- freepascal editor is run and about box, 
Version 1.0.12 2014/03/03 ( Compiler Version 2.7.1 ) printing


esktop:/$ fpc
Free Pascal Compiler version 2.7.1 [2014/03/03] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
/opt/freepascal/2.7.1/bin/fpc [options] inputfile [options]
...

But for make again ' cos  run svn update command I have make new 
changed cod


desktop:/opt/freepascal/2.7.1$ make clean all install 
INSTALL_PREFIX=/opt/freepascal/2.7.1


/bin/rm -f build-stamp.*
/bin/rm -f base.build-stamp.*
Makefile:2731: *** The only supported starting compiler version is 
2.6.2. You are trying to build with 2.7.1. If you are absolutely sure 
that the current compiler is built from the exact same version/revision, 
you can try to use OVERRIDEVERSIONCHECK=1 to override . Stop.




in Makefile:2731

versioncheckstartingcompiler:
ifndef CROSSCOMPILE
ifneq ($(FPC_VERSION),$(REQUIREDVERSION))
ifneq ($(FPC_VERSION),$(REQUIREDVERSION2))
ifndef OVERRIDEVERSIONCHECK
line 2731-$(error The only supported starting compiler version is 
$(REQUIREDVERSION). You are trying to build with $(FPC_VERSION). If you 
are absolutely sure that the current compiler is built from the exact 
same version/revision, you can try to use OVERRIDEVERSIONCHECK=1 to 
override )

else
@$(ECHO) You have overriden the starting compiler versioncheck 
while using starting compiler version $(FPC_VERSION). This situation is 
not supported and strange things and errors may happen. Remove 
OVERRIDEVERSIONCHECK=1 to fix this.

endif
endif
endif
endif

In bugtraker #0025804 jonas Maebe ...its not supported exactly... I'm 
NOT add this parameter in Makefile. My english is not good but I can 
understand you can try to use what mean. long time I use svn .svn 
folder bean more then 200 mb, I delete everything from disk, and did 
test all, I use sam script always. yesterday I get fatal error and can 
not make fpc. but now OVERRIDEVERSIONCHECK=1 can make now again, with 
out any error, lazarus too.


I wrote on up, I have only one version of fpc, but required version is 
diffrent ??  Sorry been long message but I tried give all detail.

http://bugs.freepascal.org/view_user_page.php?id=322 Any idea?

Thank you

03-03-2014 13:07 tarihinde, Sven Barth yazdı:
You don't seem to specify the FPC to use. So if you now have your 
/opt/freepascal/2.7.1/bin in PATH then the 2.7.1 compiler will be used 
which is wrong. So explicitely specify the compiler to use with the 
make option FPC=/usr/bin/fpc (or whereever it is in your system). 
Check beforehand though whether fpc -iV returns 2.6.2 instead of 
2.7.1 (it might be that the 2.6.2 compiler driver fpc nevertheless 
finds the 2.7.1 compilers ppcXXX). If it uses the wrong compiler 
then you should at best remove the /opt/freepascal/2.7.1/ directories 
from path...


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] free Pascal versions

2014-03-03 Thread Paul Breneman

On 03/03/2014 07:24 AM, JIMB wrote:

Hi,



Not sure if this is the appropriate place to send this enquiry, maybe some
one will guide me!



I used Borland T Pascal for many years and later on Delphi.  Although I have
good training in Object oriented design and implementation, I have NOT had
many occasions where it was actually needed. Much of my stuff is just number
crunching and some graphic output, (7 colour is fine).



I am struggling to make Lazarus do the stuff I want; a great deal of the
Lazarus power just confuses a simple process. Basically I need a replacement
for Borland Pascal 7. I do, however, like the Lazarus IDE.



Any ideas what I which way I should go, and where will I see any replies to
this email, if there are any?



Best wishes,

Jim



Jim Barr



Best is the enemy of good enough





Barrs law of recurcive futility:-



   If you're smart enough to use one of these.

   .you can probably manage without one


Hi Jim,

Since you wrote: Basically I need a replacement for Borland Pascal 7 I 
would like to share a little of what I wrote on a Free Pascal mailing 
list last week (hope it helps).


*

FPC DOS is pretty easy for a console program, but it is 32-bit (whereas 
DOS is 16-bit) so it isn't as simple as Turbo Pascal.  There is a 5 MB 
zip here that should make it easy to get started with FPC for DOS:

  http://www.turbocontrol.com/helloworld.htm



I think my most enjoyable work ever was during the past 3.5 years, using 
Turbo Pascal on expensive real-time embedded equipment.  I was able to 
have (a single set of) source code that was used for about 15 versions 
of about 6 different products.  One batch file called about 15 batch 
files (one for each product/version) that compiled the source and 
compared the resulting executables against what had been shipped. I've 
done similar things before (but never had so much technical fun):

  http://brenemanlabs.com/SrcCtrl.htm

Every since C# got popular I enjoy meeting programmers who don't know 
much about Delphi.  Look at the 6th message in this thread if you want 
to see my normal response:

  http://www.control.com/thread/1294638212

The bottom of this page has a little of my APro history:
  http://turbocontrol.com/APro.htm
Last month Embarcadero mentioned AsyncPro on their devices and gadgets 
XE5 seminar. I'm hoping to upgrade some of my APro examples soon.


***

I recently turned up some interesting stuff about Turbo Pascal, so 
wanted to add it here in case it might be of help.


Here I can purchase source code (for $200) to make my own Turbo Pascal 
compiler for DOS (I don't plan to purchase):

http://turbo51.com/compiler-design/tpc16-turbo-pascal-compiler-written-in-turbo-pascal

The same guy has put a bit of effort into these pages:
http://turbopascal.org/
http://turbopascal.org/turbo-pascal-download - see 3 PDFs at the bottom
http://turbopascal.org/sitemap - could look up TP bugs here?

*

Best regards,
Paul Breneman
www.TurboControl.com


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What GetChildParent does in designer and reader?

2014-03-03 Thread Fabio Luis Girardi
Hi!!

Attached the code of my prototype of TDBCtrlGrid. It works as expected on
Delphi (except the function GetDesignerDropTarget that don't exists on
Delphi TWinControl), but it don't works as expected on Lazarus.


2014-03-03 10:17 GMT-03:00 Fabio Luis Girardi fluisgira...@gmail.com:

 Hi Mattias!!

 Revision 44299 is related with this?


 The best regards


 2014-02-28 7:56 GMT-03:00 Mattias Gaertner nc-gaert...@netcologne.de:

 On Fri, 28 Feb 2014 01:47:38 +0100
 Hans-Peter Diettrich drdiettri...@aol.com wrote:

 [...]
  Component DragDrop operations

 There is no drag when adding a component to a form.

 Mattias


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




 --
 The best regards,

 Fabio Luis Girardi
 PascalSCADA Project
 http://sourceforge.net/projects/pascalscada
 http://www.pascalscada.com




-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
unit mytest;

interface

{$mode objfpc}{$H+}

uses
  SysUtils, Classes, Controls, ExtCtrls;

type

  { TMyTest }

  TMyTestChildContainer = class(TPanel);

  TMyTest = class(TWinControl)
  private
FChildContainerPanel:TMyTestChildContainer;
  protected
function GetChildParent: TComponent; override;
  public
constructor Create(AOwner:TComponent); override;
destructor Destroy; override;
function GetDesignerDropTarget(aComponent: TComponentClass): TWinControl;
  override;
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
  published
{ Published declarations }
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Samples', [TMyTest]);
end;

{ TMyTest }

constructor TMyTest.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ControlStyle:=ControlStyle-[csAcceptsControls];
  FChildContainerPanel:=TMyTestChildContainer.Create(Self);
  FChildContainerPanel.ControlStyle := [csAcceptsControls, csClickEvents,
csReplicatable, csOpaque];
  FChildContainerPanel.Parent:=Self;
  FChildContainerPanel.Align:=alTop;
  FChildContainerPanel.Height:=40;
  Height:=120;
end;

destructor TMyTest.Destroy;
begin
  FreeAndNil(FChildContainerPanel);
  inherited;
end;

function TMyTest.GetChildParent: TComponent;
begin
  Result:=FChildContainerPanel;
end;

procedure TMyTest.GetChildren(Proc: TGetChildProc; Root: TComponent);
begin
  FChildContainerPanel.GetChildren(Proc,Root);
end;

function TMyTest.GetDesignerDropTarget(aComponent: TComponentClass
  ): TWinControl;
begin
  Result:=FChildContainerPanel;
end;

end.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Não encontra o parametro?

2014-03-03 Thread William Oliveira Ferreira
Olá lista,

eu tenho um código mamão com açúcar aqui que eu não consigo entender por
que cargas d'água não encontra o parâmetro da SQL. Alguém quer chutar algo?

var
  sql_Query : TSQLQuery;
begin
  Result := False;
  sql_Query := TSQLQuery.Create(nil);
  sql_Query.DataBase := Self._Conexao;
  sql_Query.Transaction := TSQLTransaction(Self._Conexao.Transaction);

  sql_Query.SQL.Clear;
  if TSQLTransaction(Self._Conexao.Transaction).Active then
TSQLTransaction(Self._Conexao.Transaction).EndTransaction;

  sql_Query.SQL.Add('DELETE FROM loc_clientes');
  sql_Query.SQL.Add('WHERE cli_codigo = :PCodigo');

  sql_Query.ParamByName(':PCodigo').AsInteger := Codigo;

  try
sql_Query.ExecSQL;
  except
raise Exception.Create('Erro ao excluir o cliente! [ID: ' +
IntToStr(Codigo) + ']');
  end;



A mensagem de erro:

Parameter :PCodigo not found


Vira e mexe esta mensagem me assombra...


...Digo isto porque em outros trechos não ocorre.

-- 

William de Oliveira Ferreira
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Não encontra o parametro?

2014-03-03 Thread Fabio Luis Girardi
William, rescreva a sua dúvida em inglês, talvez a resposta para ela venha
mais depressa...


Em 3 de março de 2014 16:58, William Oliveira Ferreira 
bdexterholl...@gmail.com escreveu:

 Olá lista,

 eu tenho um código mamão com açúcar aqui que eu não consigo entender por
 que cargas d'água não encontra o parâmetro da SQL. Alguém quer chutar algo?

 var
   sql_Query : TSQLQuery;
 begin
   Result := False;
   sql_Query := TSQLQuery.Create(nil);
   sql_Query.DataBase := Self._Conexao;
   sql_Query.Transaction := TSQLTransaction(Self._Conexao.Transaction);

   sql_Query.SQL.Clear;
   if TSQLTransaction(Self._Conexao.Transaction).Active then
 TSQLTransaction(Self._Conexao.Transaction).EndTransaction;

   sql_Query.SQL.Add('DELETE FROM loc_clientes');
   sql_Query.SQL.Add('WHERE cli_codigo = :PCodigo');

   sql_Query.ParamByName(':PCodigo').AsInteger := Codigo;

   try
 sql_Query.ExecSQL;
   except
 raise Exception.Create('Erro ao excluir o cliente! [ID: ' +
 IntToStr(Codigo) + ']');
   end;

 

 A mensagem de erro:

 Parameter :PCodigo not found


 Vira e mexe esta mensagem me assombra...


 ...Digo isto porque em outros trechos não ocorre.

 --
 
 William de Oliveira Ferreira

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Não encontra o parametro?

2014-03-03 Thread William Oliveira Ferreira
​Sorry Guy, I thought i was sending to a brazilian list... =(
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Não encontra o parametro?

2014-03-03 Thread Fabio Luis Girardi
No problema!!! :)


2014-03-03 17:07 GMT-03:00 William Oliveira Ferreira 
bdexterholl...@gmail.com:

 Sorry Guy, I thought i was sending to a brazilian list... =(




-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Não encontra o parametro?

2014-03-03 Thread Flávio Etrusco
2014-03-03 16:58 GMT-03:00 William Oliveira Ferreira bdexterholl...@gmail.com:
 Olá lista,

 eu tenho um código mamão com açúcar aqui que eu não consigo entender por que
 cargas d'água não encontra o parâmetro da SQL. Alguém quer chutar algo?

 var
   sql_Query : TSQLQuery;
 begin
   Result := False;
   sql_Query := TSQLQuery.Create(nil);
   sql_Query.DataBase := Self._Conexao;
   sql_Query.Transaction := TSQLTransaction(Self._Conexao.Transaction);

   sql_Query.SQL.Clear;
   if TSQLTransaction(Self._Conexao.Transaction).Active then
 TSQLTransaction(Self._Conexao.Transaction).EndTransaction;

   sql_Query.SQL.Add('DELETE FROM loc_clientes');
   sql_Query.SQL.Add('WHERE cli_codigo = :PCodigo');

   sql_Query.ParamByName(':PCodigo').AsInteger := Codigo;

   try
 sql_Query.ExecSQL;
   except
 raise Exception.Create('Erro ao excluir o cliente! [ID: ' +
 IntToStr(Codigo) + ']');
   end;

 

 A mensagem de erro:

 Parameter :PCodigo not found


 Vira e mexe esta mensagem me assombra...


 ...Digo isto porque em outros trechos não ocorre.

 --

I believe ':' isn't part of the parameter name? (i.e. you're not
supposed to include it when invoking ParamByName).

Regards,
Flávio

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Não encontra o parametro?

2014-03-03 Thread William Oliveira Ferreira
Exactly Flávio. That ':' shouldn't be there...


Thanks...


Em 3 de março de 2014 17:10, Flávio Etrusco flavio.etru...@gmail.comescreveu:

 2014-03-03 16:58 GMT-03:00 William Oliveira Ferreira 
 bdexterholl...@gmail.com:
  Olá lista,
 
  eu tenho um código mamão com açúcar aqui que eu não consigo entender por
 que
  cargas d'água não encontra o parâmetro da SQL. Alguém quer chutar algo?
 
  var
sql_Query : TSQLQuery;
  begin
Result := False;
sql_Query := TSQLQuery.Create(nil);
sql_Query.DataBase := Self._Conexao;
sql_Query.Transaction := TSQLTransaction(Self._Conexao.Transaction);
 
sql_Query.SQL.Clear;
if TSQLTransaction(Self._Conexao.Transaction).Active then
  TSQLTransaction(Self._Conexao.Transaction).EndTransaction;
 
sql_Query.SQL.Add('DELETE FROM loc_clientes');
sql_Query.SQL.Add('WHERE cli_codigo = :PCodigo');
 
sql_Query.ParamByName(':PCodigo').AsInteger := Codigo;
 
try
  sql_Query.ExecSQL;
except
  raise Exception.Create('Erro ao excluir o cliente! [ID: ' +
  IntToStr(Codigo) + ']');
end;
 
  
 
  A mensagem de erro:
 
  Parameter :PCodigo not found
 
 
  Vira e mexe esta mensagem me assombra...
 
 
  ...Digo isto porque em outros trechos não ocorre.
 
  --

 I believe ':' isn't part of the parameter name? (i.e. you're not
 supposed to include it when invoking ParamByName).

 Regards,
 Flávio

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 

William de Oliveira Ferreira
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What GetChildParent does in designer and reader?

2014-03-03 Thread Mattias Gaertner
On Mon, 3 Mar 2014 16:47:30 -0300
Fabio Luis Girardi fluisgira...@gmail.com wrote:

 Hi!!
 
 Attached the code of my prototype of TDBCtrlGrid. It works as expected on
 Delphi (except the function GetDesignerDropTarget that don't exists on
 Delphi TWinControl), but it don't works as expected on Lazarus.

On second thought the LCL method is not very flexible.
I added a general designer event.

See
http://wiki.lazarus.freepascal.org/Extending_the_IDE#Example:_When_dropping_a_new_component_move_control_to_a_child

Please test.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiling on OpenBSD

2014-03-03 Thread Mattias Gaertner
On Thu, 27 Feb 2014 08:09:42 -0300
Leonardo Rame l.r...@griensu.com wrote:

 #7  0x00b038ce in GETSTYLEWITHNAME (
 WNAME=0x1ae7258 vertical scrollbar) at gtk2proc.inc:7815

That is
StyleObject^.Widget := gtk_vscrollbar_new(nil);

That means a normal gtk call fails.

Probably there was some other bug happened prior to this and crumbled
the heap or stack.
Please compile with more checks. For example:

make clean all OPT='-Criot -ghtl'

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus