Telegram_2020-11-23T12

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2020 > 11 > 23 >

Telegram_2020-11-23T12

Telegram link

 

2020-11-23T12:01:26

 

Do you have any example where something similar is handled?

 


 

Telegram link

 

2020-11-23T12:01:53

 

There is a thread demo in our demos

 


 

Telegram link

 

2020-11-23T12:02:40

 

Many dbs require an extra step when used in threads as well

 


 

Telegram link

 

2020-11-23T12:04:21

 

I want to open a data table made in MYSQL from a Thread when my server starts. That same table will be opened by users who open a session on my server.

 

Can you help me with that task? Thank you.

 


 

Telegram link

 

2020-11-23T12:09:15

 

You need to see if the mysql client library you are using needs any special steps to be used in a thread. That is where I would start. Many DB client libs require a special step when used in threads. Most likely your issue is around this.

 


 

Telegram link

 

2020-11-23T12:10:49

 

Okay. I'm going to check the MYSQL documentation

 


 

Telegram link

 

2020-11-23T12:11:17

 

Are you accessing anything other than the DB in your threads?

 


 

Telegram link

 

2020-11-23T12:13:54

 

I create a text file to keep track of my routine. I took it off and he behaves the same. I open the file and loop through it sequentially to get all the records in an array, then I evaluate that array and with the results I go to the data file and make updates with UPDATE. Everything works as long as a session is not opened on my server.

 


 

Telegram link

 

2020-11-23T12:15:04

 

do you access the text file from a session as well?

 


 

Telegram link

 

2020-11-23T12:15:14

 

or any other shared objects?

 


 

Telegram link

 

2020-11-23T12:15:41

 

No. It is temporal

 


 

Telegram link

 

2020-11-23T12:16:20

 

Then most likely not taking the steps that the mysql client lib needs for threading is the most likely issue.

 


 

Telegram link

 

2020-11-23T12:18:11

 

Ok.

 


 

Telegram link

 

2020-11-23T12:18:36

 

Many DB clients create an auto session, but when threaded you need an explicit session to be created for each thread.

 


 

Telegram link

 

2020-11-23T12:22:11

 

How do I create a specific session for each thread? There are no examples of that case.

 


 

Telegram link

 

2020-11-23T12:23:27

 

Im not sure if mysql requires this or not, but if so its a mysql client library issue for any use in threads, not something specific to IntraWeb so I would suggest you seek support from a generic Delphi forum on how to use the mysql client library you are using from within a thread.

 


 

Telegram link

 

2020-11-23T12:25:13

 

Okay. I'll keep looking.

 


 

Telegram link

 

2020-11-23T12:26:10

 

I use FIREDAC

 


 

Telegram link

 

2020-11-23T12:26:29

 

Then I would ask on the firedac support forums about using firedac from within threads.

 


 

Telegram link

 

2020-11-23T12:30:38

 

type: link http://docwiki.embarcadero.com/RADStudio/Sydney/en/Multithreading_(FireDAC)

 


 

Telegram link

 

2020-11-23T12:32:40

 

I am reviewing it