🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
4 messages
4 total messages Started by Francesco Rossi Fri, 07 Dec 2001 18:12
Using property of the remote application server
#378
Author: Francesco Rossi
Date: Fri, 07 Dec 2001 18:12
20 lines
1575 bytes
Hi,
i 've make an application server using type library with c++builder 5.
I' ve make also a client application that use the properties of remote
application server. The client connect to the remote using the socket and
all work fine.
In a method FormCreate of client application i do this:

 IDispatch *disp = (IDispatch*)(ClientDataSetTransazioni->AppServer);
 IDMFastServerDisp ITemp( (IDMFastServer*)disp);
// Property of applicationserver
 if (!(bool)ITemp.IsDatabaseOpen) {
...
}

for check if the remote database is open, but when i close the application
this crash with a general protection error: it can't close some form,
because the IDE stop at line that destruct a form.

Is there anyone that tell me what is the problem ?
Thank.
Re: Using property of the remote application server
#379
Author: vavan
Date: Sat, 08 Dec 2001 10:52
24 lines
1839 bytes
On Fri, 7 Dec 2001 19:12:46 +0100, "Francesco Rossi" <inforsi@tin.it>
wrote:

>In a method FormCreate of client application i do this:
>
> IDispatch *disp = (IDispatch*)(ClientDataSetTransazioni->AppServer);
> IDMFastServerDisp ITemp( (IDMFastServer*)disp);
>// Property of applicationserver
> if (!(bool)ITemp.IsDatabaseOpen) {
>...
>}
>
>for check if the remote database is open, but when i close the application
>this crash with a general protection error: it can't close some form,
>because the IDE stop at line that destruct a form.

I suffer from similar very annoying problem that happens from time to
time. I tried to investigate and discovered an AV happens with Variant
variable when trying to invoke VarClear method somewhere inside VCL.
The most interesting is when I rebuild the project the problem is gone
till next time...

--
Vladimir Ulchenko aka vavan
R: Using property of the remote application server
#382
Author: Francesco Rossi
Date: Sun, 09 Dec 2001 22:12
23 lines
1678 bytes
Hi,
i found the solution for my problem. I hope this help you.
I must add the code:
ITemp->AddRef ();
for increment the reference of the server to the client object.
The code is:

IDispatch *disp = (IDispatch*)(ClientDataSetTransazioni->AppServer);
IDMFastServerDisp ITemp( (IDMFastServer*)disp);
ITemp->AddRef ();                        // <<<<<
// Property of applicationserver
if (!(bool)ITemp.IsDatabaseOpen) {

BYE
>
> I suffer from similar very annoying problem that happens from time to
> time. I tried to investigate and discovered an AV happens with Variant
> variable when trying to invoke VarClear method somewhere inside VCL.
> The most interesting is when I rebuild the project the problem is gone
> till next time...
>
> --
> Vladimir Ulchenko aka vavan
Re: Using property of the remote application server
#308
Author: vavan
Date: Wed, 26 Dec 2001 09:21
14 lines
1522 bytes
On Sat, 08 Dec 2001 13:52:21 +0300, vavan <vavan@santel.ru> wrote:

>I suffer from similar very annoying problem that happens from time to
>time. I tried to investigate and discovered an AV happens with Variant
>variable when trying to invoke VarClear method somewhere inside VCL.
>The most interesting is when I rebuild the project the problem is gone
>till next time...

Recently one good guy informed me that this is well known problem
related to unusability of builder's incremental linker and I switched
that option (don't generate state files) to off. Keep on testing...

--
Vladimir Ulchenko aka vavan
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads