Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
TDBISAM inside a TService |
Thu, Oct 5 2006 12:47 PM | Permanent Link |
Jacob | Hello.
I am creating a TDBISAMDatabase component inside the Execute method of a TService component in C++. I do not have problems in creating it, but when I assign a value to one of its properties (for example, SessionName...) the code does it but it is not actually updated, so the watch list indicates that this value is still NULL. Therefore, I have problems to open a connection inside a TService object ( I want to create a service under W2000). It´s the first time I am creating a service in C++ builder 6 enviroment, so I am not sure if DBISAM components have problems with this. Please any clue will be welcomed. I can give you some code if needed. Thanks for the support. Regards. |
Thu, Oct 5 2006 3:35 PM | Permanent Link |
"Jose Eduardo Helminsky" | Jabob
There is no problems with DBISAM and Windows Services. DBISAM server is an example of this kind of application. My question is: Is this a multi-thread application ? Eduardo |
Thu, Oct 5 2006 4:15 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jacob,
<< I am creating a TDBISAMDatabase component inside the Execute method of a TService component in C++. I do not have problems in creating it, but when I assign a value to one of its properties (for example, SessionName...) the code does it but it is not actually updated, so the watch list indicates that this value is still NULL. Therefore, I have problems to open a connection inside a TService object ( I want to create a service under W2000). >> Could you post the code that you're using to create the TDBISAMDatabase component ? I suspect that the component is not being created properly or that you're using an invalid reference to the component instance. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Oct 6 2006 4:19 AM | Permanent Link |
Jacob | "Jose Eduardo Helminsky" <contato@hpro.com.br> wrote:
Jabob There is no problems with DBISAM and Windows Services. DBISAM server is an example of this kind of application. My question is: Is this a multi-thread application ? Eduardo //-------------------- I am creating a thread inside the OnStart event of TService, as I have seen in many tutorials, but the DBISAM components are created in two different ways: 1) I have added a TDatamodule with some DBISAM comp. They have a correct reference and some properties are correct, but still string propertires are always set to NULL and I have no chance of changing it. 2) I create a TDBISAMDatabase component inside the OnStart event. I use this code: void __fastcall TMonitorizacion::ServiceStart(TService *Sender, bool &Started) { TDBISAMDatabase * base; base = new TDBISAMDatabase(NULL); base->SessionName = "this"; delete base; } Before I destroy "base", I check SessionName property. Its value is NULL, no matter if I assigned "this" the sentence before. |
Fri, Oct 6 2006 4:10 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jacob,
<< I am creating a thread inside the OnStart event of TService, as I have seen in many tutorials, but the DBISAM components are created in two different ways: 1) I have added a TDatamodule with some DBISAM comp. They have a correct reference and some properties are correct, but still string propertires are always set to NULL and I have no chance of changing it. >> Which DBISAM components are being created in the data module ? Is the data module being used from within the thread that you create ? << 2) I create a TDBISAMDatabase component inside the OnStart event. I use this code: void __fastcall TMonitorizacion::ServiceStart(TService *Sender, bool &Started) { TDBISAMDatabase * base; base = new TDBISAMDatabase(NULL); base->SessionName = "this"; delete base; } Before I destroy "base", I check SessionName property. Its value is NULL, no matter if I assigned "this" the sentence before. >> Is there a TDBISAMSession already created called "this" in your service application anywhere ? -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, April 26, 2024 at 06:09 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |