RTC Forums
April 25, 2024, 05:42:46 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: 1 [2]
  Print  
Author Topic: Access Violation in CompareText()  (Read 11821 times)
jorgen
RTC Expired
*
Posts: 20


« Reply #15 on: March 11, 2016, 11:14:29 AM »

I have ported my server to use Firedac.

Is it possible to get a copy of you code (email or download)  to I can add multi thread support to it?


regards
Jørgen
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #16 on: March 11, 2016, 01:20:34 PM »

If you mean a copy of Joe's code which works with FireDac in a Multi-Threaded Server, I think the solution to his AV problem was to create FireDac components with NIL as the Owner parameter in the constructor.

Best Regards,
Danijel Tkalcec
Logged
jorgen
RTC Expired
*
Posts: 20


« Reply #17 on: March 11, 2016, 02:10:53 PM »

If he or someone else  have a working sample / code showing how to use firedac with RTC it would be nice.

A best practice sample from RTC would have been even better.


Jørgen
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #18 on: March 11, 2016, 03:20:09 PM »

I'm not familiar with FireDAC (it has been quite a while since the last time I have done anything with Databases in Delphi), but ... any example for using the Database Access components of your choice (in this case: FireDAC) should work with the RTC SDK in single-threaded mode (MultiThreaded=False), without much modification. The only difference in multi-threaded mode (MultiThreaded=True), is that you will need a sepatate set of Database Access components for each thread. This usually means creating a separete set of Database Session, Database Connection and Table/Query components. The easiest way of achieving this is to create all the components required for Database Access on-the-fly, just before you need to access the Database and destroy them afterwards. A better and more optimized approach is to use a Database Connection Pool. For an example Database Connection Pool implementation (written by a RTC user), check this FAQ Topic (CLICK).

Best Regards,
Danijel Tkalcec
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.