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
Delphi 7 Exception List index out of bound ()
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Delphi 7 Exception List index out of bound ()
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
which Version of Zeos and Microsoft SQL Server do you use for this project? Which Zeos driver do you use?
With best regards,
Jan
Re: Delphi 7 Exception List index out of bound ()
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
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
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Delphi 7 Exception List index out of bound ()
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
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
Re: Delphi 7 Exception List index out of bound ()
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 ?
do you have any suggestions for creating the game ?
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Delphi 7 Exception List index out of bound ()
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
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