Delphi 7 Exception List index out of bound ()

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
top1
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 22.11.2015, 18:11

Delphi 7 Exception List index out of bound ()

Post by top1 »

I have ZConnection and ZQuery on its own seperate thread but when the thread fires at the same time problems may occur

I find this thread http://zeoslib.sourceforge.net/viewtopic.php?t=3281

But I cant contact him for the solutions

Thanks for comments
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Re: Delphi 7 Exception List index out of bound ()

Post by marsupilami »

Hello top1,

which Version of Zeos and Microsoft SQL Server do you use for this project? Which Zeos driver do you use?
With best regards,

Jan
top1
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 22.11.2015, 18:11

Re: Delphi 7 Exception List index out of bound ()

Post by top1 »

i'm using 7.2 with lasted rev with 10.1.8-MariaDB as server

i'm implementing some game when the socket calls receivetext i 'll call new thread every time , in thread , its has own tzconnection and tzquery , create every time when thread runs, thread can run in parallel

thank you
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Re: Delphi 7 Exception List index out of bound ()

Post by marsupilami »

Hello Hello top1,

I am not sure if Zeos meets the requirements to use MariaDB in a threadsafe way. Other users reported for zeos to be threadsafe when used with Postgresql. Can you provide a callstack to see where this exeception is created by Zeos?

With best regards,

Jan
top1
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 22.11.2015, 18:11

Re: Delphi 7 Exception List index out of bound ()

Post by top1 »

i think my problem is my program can't share a component in parallel ? like tzquery or tzconnection even tzstoredproc?

do you have any suggestions for creating the game ?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Re: Delphi 7 Exception List index out of bound ()

Post by marsupilami »

Hello top1,

hmm - I don't know your program. The rule usually is that every thread needs its own TZConnection. One TZConnection object may not be shared between different threads. So as long as you have one TZConnection per Thread and as long as all Components in that thread use this TZConnection object things should be fine. Bud I didn't test that and also so don't know for sure. Also this would depend on the thread safety requirements of the underlying database client library.

If things don't work for you maybe some kind of producer - consumer pattern could work for you?

With best regards,

Jan
Post Reply