Error in second execution of EXECSQL

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Error in second execution of EXECSQL

Post by pttk »

Hi,

I execute one TQuery component in input system (TQuery1.ExecSQL), and exit of system execute again, but when execute in exit send "Acces Violation ...."

Any idea?
PTTK
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Do you have an easily repeatable sample program? Does it depend on the database server used?
If you post the sample program and a description to the bug tracker (http://zeosbugs.firmos.at/) I might give it a try, provided you're using mysql, postgresql or (eventually but not preferred) firebird or sqlite. Don't forget to include db setup scripts when they are needed.

Mark
Image
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Post by pttk »

Hi and thank,

I use MySQL, my code is:

Scritps:

UPDATE empresas_usuarios SET Eus_Conectado=:b_Activo,
Eus_IPConexion=:s_IP, Eus_Modificacion=:d_Fecha
Where Eus_Codigo=:n_Usuario

Code :

procedure TForm_Principal.FormCreate(Sender: TObject);
.........
ZQuery_UsuarioActivo.Params[0].Value := True;
ZQuery_UsuarioActivo.Params[1].Value := s_IP;
ZQuery_UsuarioActivo.Params[2].Value := Now;
ZQuery_UsuarioActivo.Params[3].Value := n_CodigoUsuario;
ZQuery_UsuarioActivo.ExecSQL; //Execution OK
.........

procedure TForm_Principal.BitBtn_SalirClick(Sender: TObject);
Begin
ZQuery_UsuarioActivo.Params[0].Value := False;
ZQuery_UsuarioActivo.Params[1].Value := s_IP;
ZQuery_UsuarioActivo.Params[2].Value := Now;
ZQuery_UsuarioActivo.Params[3].Value := n_CodigoUsuario;
Try
ZQuery_UsuarioActivo.ExecSQL; // CRASH execution
ZConnection_Infotecnologia.Disconnect;
Agregar_Historia(DateTimetoStr(Now)+' ******************Saliendo de aplicación******************');
TextDataSet_Historia.Close;
Finally
End;
b_Salir := True;
Close;
End;

Thank
PTTK
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Please,

To test this myself I need to build everything again myself.That' isn't fun at all when debugging somebody else's application.
So please make a zip file containing:
- The create table+insert statements necessary to have a good situation to run the program with. That way I can make the correct tables in the database
- The project files necessary to build the project (~your project dir without exe, dcu, dll files). I can compile both Lazarus and Delphi programs.

Just strip everything we don't need to reproduce the problem. Then I only have to change the connection parameters, run and push the right button to reproduce the problem.

Mark
Image
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Post by pttk »

Thank

But I use Delphi2009 and Zeos 6.6.4 modified for Delphi2009, not problem?

Thank again
PTTK
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Who modified this? If it's not 7.0 alpha, it's an unsupported version!! (At least not supported by us).
So you can still send me the stuff but I'll only test using the zeoslib testing or trunk branch. Which is also just 6.6.4 but modified for D2009.

Mark
Image
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Post by pttk »

I download in http://zeos.firmos.at in ZeosLib 7.0 Alfatest Forum.

How UpLoad the Zip code?

Thank

PTTK
PTTK
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

If it's not to big just attach it to a new post in the 'ZeosLib 7.0 Alfatest Forum'. That's the 'bug list' for the new version.
If it's too big just mail it to zeoslib at gmail dot com.

Mark

P.S. Use the downloads directory http://zeosdownload.firmos.at/downloads/snapshots for the most recent versions of our alphatest version.
Image
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Post by pttk »

Ok, thank
PTTK
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Post by pttk »

Hi,

I install 7.0.0-dev in Delphi 2009, compile and build, the error is the same.

Any idea?
PTTK
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

So please make a zip file containing:
- The create table+insert statements necessary to have a good situation to run the program with. That way I can make the correct tables in the database
- The project files necessary to build the project (~your project dir without exe, dcu, dll files). I can compile both Lazarus and Delphi programs.

Just strip everything we don't need to reproduce the problem. Then I only have to change the connection parameters, run and push the right button to reproduce the problem.
Image
pttk
Junior Boarder
Junior Boarder
Posts: 37
Joined: 24.03.2006, 15:07

Post by pttk »

Thank

I copy TQuery with another name and execute one at inicial and other at the end.

Now work ok.
PTTK
Post Reply