Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread dbisam and dinamic DLL call
Sat, Mar 4 2006 6:18 AMPermanent Link

"Santy Concepción"
Hi!

I'm getting an error when trying to call a Form in a DLL the second time.

The first time I show it, the Form is showed correctly and can work with it.
If I close the DLL-Form and open it again, I get an error message that says
that "... Database XXX is already created ..."

I'm using DBISAM in local mode (no CS, only one computer).
The form in the DLL contains a DBISAMSessiona and a DBISAMDatabase
The MainForm in the Application contains another DBISAMSession and
DBISAMDatabase
DLL form is called dinamically from the Application MainForm.

Have I to close/disconnect the ManiForm Database or Session before calling
the one in the DLL?
Maybe the DLL Database/Session still is "on memory" after I close it?
(Windows has it)

Mon, Mar 6 2006 11:59 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Santy,

<< The first time I show it, the Form is showed correctly and can work with
it. If I close the DLL-Form and open it again, I get an error message that
says that "... Database XXX is already created ..."

I'm using DBISAM in local mode (no CS, only one computer).
The form in the DLL contains a DBISAMSessiona and a DBISAMDatabase
The MainForm in the Application contains another DBISAMSession and
DBISAMDatabase
DLL form is called dinamically from the Application MainForm.

Have I to close/disconnect the ManiForm Database or Session before calling
the one in the DLL? Maybe the DLL Database/Session still is "on memory"
after I close it? (Windows has it)  >>

How is the DLL being loaded ?  Statically or dynamically (LoadLibrary) ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Mar 6 2006 3:18 PMPermanent Link

"Santy Concepción"
Dynamically...

The problem is that, I have 5 DLLs, but the error only occurrs with only one
of them, so I think (hope) is something wrong with the code.


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> escribió en el
mensaje news:61DABD7D-2323-4427-A2F4-3C32A7369A19@news.elevatesoft.com...
> Santy,
>
> << The first time I show it, the Form is showed correctly and can work
> with it. If I close the DLL-Form and open it again, I get an error message
> that says that "... Database XXX is already created ..."
>
> I'm using DBISAM in local mode (no CS, only one computer).
> The form in the DLL contains a DBISAMSessiona and a DBISAMDatabase
> The MainForm in the Application contains another DBISAMSession and
> DBISAMDatabase
> DLL form is called dinamically from the Application MainForm.
>
> Have I to close/disconnect the ManiForm Database or Session before calling
> the one in the DLL? Maybe the DLL Database/Session still is "on memory"
> after I close it? (Windows has it)  >>
>
> How is the DLL being loaded ?  Statically or dynamically (LoadLibrary) ?
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Tue, Mar 7 2006 4:59 AMPermanent Link

"Santy Concepción"
Ok, It was my fault.

I was assigning different DataBaseNames to the same Table at runtime (one on
Design Time and one on RunTime).
Now it works fine.

Thanks!

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> escribió en el
mensaje news:61DABD7D-2323-4427-A2F4-3C32A7369A19@news.elevatesoft.com...
> Santy,
>
> << The first time I show it, the Form is showed correctly and can work
> with it. If I close the DLL-Form and open it again, I get an error message
> that says that "... Database XXX is already created ..."
>
> I'm using DBISAM in local mode (no CS, only one computer).
> The form in the DLL contains a DBISAMSessiona and a DBISAMDatabase
> The MainForm in the Application contains another DBISAMSession and
> DBISAMDatabase
> DLL form is called dinamically from the Application MainForm.
>
> Have I to close/disconnect the ManiForm Database or Session before calling
> the one in the DLL? Maybe the DLL Database/Session still is "on memory"
> after I close it? (Windows has it)  >>
>
> How is the DLL being loaded ?  Statically or dynamically (LoadLibrary) ?
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Tue, Mar 7 2006 3:20 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Santy,

<< Dynamically...

The problem is that, I have 5 DLLs, but the error only occurrs with only
one of them, so I think (hope) is something wrong with the code. >>

Are you unloading the DLL after calling the form, or keeping it loaded ?
Also, is the form that contains the database components being created and
destroyed on every call to the DLL ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Mar 8 2006 5:14 AMPermanent Link

"Santy Concepción"
Hi, Tim...

I solved the problem. It was my fault.
I was assigning a different DataBaseName at runtime and design time. Now it
works...



"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> escribió en el
mensaje news:E159D91A-EE61-43C3-AEDF-3CCD60C4596C@news.elevatesoft.com...
> Santy,
>
> << Dynamically...
>
> The problem is that, I have 5 DLLs, but the error only occurrs with only
> one of them, so I think (hope) is something wrong with the code. >>
>
> Are you unloading the DLL after calling the form, or keeping it loaded ?
> Also, is the form that contains the database components being created and
> destroyed on every call to the DLL ?
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Image