Discussion:
MAV in IDE
(too old to reply)
Frank J. Polan
2008-09-26 20:50:58 UTC
Permalink
In IDE

open a BDE alias from Navigator
open a table from Navigator
close table

In command window type "Close Databases"

I get a MAV every time - anyone else see it

Frank Polan
Bruce Beacham
2008-09-26 21:30:06 UTC
Permalink
Post by Frank J. Polan
In IDE
open a BDE alias from Navigator
This may seem a silly question but (since I never use the Navigator) how
do you do that?
Post by Frank J. Polan
In command window type "Close Databases"
I get a MAV every time - anyone else see it
Below is bug 3298, which may be related - you may wish to test for it
before issuing "Close Databases".


Bruce Beacham


If you add a database to _app.databases and then release that database,
_app.databases[1] gets released as well.

I believe it is this which, when I subsequently refer to _app.databases[1]
deep in my programs, leads to internal errors.

***************
? "Start."
?
? "empty(_app.databases[1]) ", empty(_app.databases[1])
? "Make new database, d."
d = new database("db2ksample")
? "Add it to _app.databases, so it is subscript[2]."
_app.databases.add(d)
? "Check that that is so:"
? "_app.databases[1] = d", _app.databases[1] = d
? "_app.databases[2] = d", _app.databases[2] = d
?
? "Release the new database."
release object d
?
? "Examine the result:"
if type("_app.databases[2]") = "O"
? "empty(_app.databases[2]) ", empty(_app.databases[2])
else
? "_app.databases[2] does not exist."
endif
? "empty(_app.databases[1]) ", empty(_app.databases[1])
?
? "_app.databases[1] has been released by the release of ";
+ "_app.databases[2]."
?
***************
Ken Mayer [dBVIPS]
2008-09-26 21:50:56 UTC
Permalink
Post by Bruce Beacham
Post by Frank J. Polan
In IDE
open a BDE alias from Navigator
This may seem a silly question but (since I never use the Navigator) how
do you do that?
Tables tab in the Navigator, Click on the "Look In:" combobox, and
select the database ...

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Bruce Beacham
2008-09-27 09:33:25 UTC
Permalink
Post by Ken Mayer [dBVIPS]
Post by Bruce Beacham
Post by Frank J. Polan
open a BDE alias from Navigator
This may seem a silly question but (since I never use the Navigator)
how do you do that?
Tables tab in the Navigator, Click on the "Look In:" combobox, and
select the database ...
Thanks, Ken. I looked in the Look In box when examining several tabs -
but not the Tables tab!!


Bruce
Frank J. Polan
2008-09-26 22:36:14 UTC
Permalink
Bruce

Where this comes up is when I'm working with tables in the IDE and
then run my standard app startup program which closes everything
before starting. It's not needed in an EXE but it gives a clean
environment when testing in the IDE

Thanks

Frank Polan

On Fri, 26 Sep 2008 22:30:06 +0100, Bruce Beacham
Post by Bruce Beacham
Post by Frank J. Polan
In IDE
open a BDE alias from Navigator
This may seem a silly question but (since I never use the Navigator) how
do you do that?
Post by Frank J. Polan
In command window type "Close Databases"
I get a MAV every time - anyone else see it
Below is bug 3298, which may be related - you may wish to test for it
before issuing "Close Databases".
Bruce Beacham
If you add a database to _app.databases and then release that database,
_app.databases[1] gets released as well.
I believe it is this which, when I subsequently refer to _app.databases[1]
deep in my programs, leads to internal errors.
***************
? "Start."
?
? "empty(_app.databases[1]) ", empty(_app.databases[1])
? "Make new database, d."
d = new database("db2ksample")
? "Add it to _app.databases, so it is subscript[2]."
_app.databases.add(d)
? "Check that that is so:"
? "_app.databases[1] = d", _app.databases[1] = d
? "_app.databases[2] = d", _app.databases[2] = d
?
? "Release the new database."
release object d
?
? "Examine the result:"
if type("_app.databases[2]") = "O"
? "empty(_app.databases[2]) ", empty(_app.databases[2])
else
? "_app.databases[2] does not exist."
endif
? "empty(_app.databases[1]) ", empty(_app.databases[1])
?
? "_app.databases[1] has been released by the release of ";
+ "_app.databases[2]."
?
***************
Robert Bravery
2008-09-27 06:29:41 UTC
Permalink
Hi,

Seems to work fine for me
Robert
Post by Frank J. Polan
In IDE
open a BDE alias from Navigator
open a table from Navigator
close table
In command window type "Close Databases"
I get a MAV every time - anyone else see it
Frank Polan
---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 080926-0, 26/09/2008
Tested on: 27/09/2008 08:25:30 AM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
--
Web Development, Hosting, Design and Content Management Systems
http://www.integralwebsolutions.co.za



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080926-0, 26/09/2008
Tested on: 27/09/2008 08:29:44 AM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
Andrew Shimmin
2008-09-27 08:00:37 UTC
Permalink
Frank,

I can confirm it with b2083 on WXPP_sp3.

After the "close databases" the navigator shows all databases closed BUT
if you exit and re-enter the IDE the database that was originally opened
is still opened.

regards, andrew
Post by Frank J. Polan
In IDE
open a BDE alias from Navigator
open a table from Navigator
close table
In command window type "Close Databases"
I get a MAV every time - anyone else see it
Frank Polan
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Bruce Beacham
2008-09-27 09:56:11 UTC
Permalink
Post by Andrew Shimmin
After the "close databases" the navigator shows all databases closed BUT
if you exit and re-enter the IDE the database that was originally opened
is still opened.
If you look in PLUS.ini after the crash out, in the [Database] group
you'll see the selected database named as the current alias.
Therefore I suggest it's that the database _is_ closed by the BDE when
PLUS crashes out, but is re-opened by PLUS when it re-starts.


Bruce
Andrew Shimmin
2008-09-27 22:40:10 UTC
Permalink
That makes sense but I feel it is still a problem.

regards, andrew
Post by Bruce Beacham
Post by Andrew Shimmin
After the "close databases" the navigator shows all databases closed
BUT if you exit and re-enter the IDE the database that was originally
opened is still opened.
If you look in PLUS.ini after the crash out, in the [Database] group
you'll see the selected database named as the current alias. Therefore I
suggest it's that the database _is_ closed by the BDE when PLUS crashes
out, but is re-opened by PLUS when it re-starts.
Bruce
Bruce Beacham
2008-09-27 09:52:06 UTC
Permalink
Post by Frank J. Polan
In IDE
open a BDE alias from Navigator
open a table from Navigator
close table
In command window type "Close Databases"
I get a MAV every time - anyone else see it
If you click Cancel in the error window, then issue Close Databases
_again_, PLUS behaves properly and the Look In returns to the default
directory.


Bruce
Bruce Beacham
2008-09-27 09:49:48 UTC
Permalink
Post by Frank J. Polan
open a BDE alias from Navigator
by selecting it in the Look-In box
Post by Frank J. Polan
open a table from Navigator
by double-clicking on it.
Post by Frank J. Polan
close table
by closing the browse window.
Post by Frank J. Polan
In command window type "Close Databases"
I get a MAV every time - anyone else see it
I too can confirm this in b.2083.

This is veerrry interesting to me. The window that opens when the
table name is double-clicked is not a normal browse window because it is
not using a table in the active area. (When the table window is open,
type DISP STAT in the command window: there are no open tables). So
when the table window is closed, quite possibly there is some residue of
the query still in existence. So perhaps when an attempt is made to
close the database, PLUS references some aspect of the query and trips
up on something.

The reason this is so interesting to me is that I have a bug that goes
back several years that relates to the closure of databases and which I
have been unable to reduce to a turnkey; I believe my case relates to
queries that have not been closed, despite my best efforts, particularly
in the context of several datamodules opened on one database alias (each
datamodule with its own database object). In my case it is an OOP
issue, not an XDML code issue.

So I believe that somewhere there is a bigger background problem, and
Frank may well have hit on a reliable simple was of diagnosing it.

So, Kathy, please add a Me Too.

Thanks, Frank.


Bruce Beacham
Frank J. Polan
2008-09-27 13:23:19 UTC
Permalink
Bruce

Yes that's why I posted it. In itself it's not a problem but I thought
it might be indicative of something serious

Thanks

Frank Polan

On Sat, 27 Sep 2008 10:49:48 +0100, Bruce Beacham
Post by Bruce Beacham
Post by Frank J. Polan
open a BDE alias from Navigator
by selecting it in the Look-In box
Post by Frank J. Polan
open a table from Navigator
by double-clicking on it.
Post by Frank J. Polan
close table
by closing the browse window.
Post by Frank J. Polan
In command window type "Close Databases"
I get a MAV every time - anyone else see it
I too can confirm this in b.2083.
This is veerrry interesting to me. The window that opens when the
table name is double-clicked is not a normal browse window because it is
not using a table in the active area. (When the table window is open,
type DISP STAT in the command window: there are no open tables). So
when the table window is closed, quite possibly there is some residue of
the query still in existence. So perhaps when an attempt is made to
close the database, PLUS references some aspect of the query and trips
up on something.
The reason this is so interesting to me is that I have a bug that goes
back several years that relates to the closure of databases and which I
have been unable to reduce to a turnkey; I believe my case relates to
queries that have not been closed, despite my best efforts, particularly
in the context of several datamodules opened on one database alias (each
datamodule with its own database object). In my case it is an OOP
issue, not an XDML code issue.
So I believe that somewhere there is a bigger background problem, and
Frank may well have hit on a reliable simple was of diagnosing it.
So, Kathy, please add a Me Too.
Thanks, Frank.
Bruce Beacham
Andrew Shimmin
2008-09-27 22:47:49 UTC
Permalink
Bruce,

FWIW, while figuring out how to set the BDE PrivateDirecory I discovered the navigator uses the default database (database[1]) which is always opened by dBase on start.

When you open a database with "d = new database()" it opens a new database object (database[2]).

When a table is opened with "use tableName" with opening a new database it uses the default database.

regards, andrew
Post by Bruce Beacham
Post by Frank J. Polan
open a BDE alias from Navigator
by selecting it in the Look-In box
Post by Frank J. Polan
open a table from Navigator
by double-clicking on it.
Post by Frank J. Polan
close table
by closing the browse window.
Post by Frank J. Polan
In command window type "Close Databases"
I get a MAV every time - anyone else see it
I too can confirm this in b.2083.
This is veerrry interesting to me. The window that opens when the
table name is double-clicked is not a normal browse window because it is
not using a table in the active area. (When the table window is open,
type DISP STAT in the command window: there are no open tables). So
when the table window is closed, quite possibly there is some residue of
the query still in existence. So perhaps when an attempt is made to
close the database, PLUS references some aspect of the query and trips
up on something.
The reason this is so interesting to me is that I have a bug that goes
back several years that relates to the closure of databases and which I
have been unable to reduce to a turnkey; I believe my case relates to
queries that have not been closed, despite my best efforts, particularly
in the context of several datamodules opened on one database alias (each
datamodule with its own database object). In my case it is an OOP
issue, not an XDML code issue.
So I believe that somewhere there is a bigger background problem, and
Frank may well have hit on a reliable simple was of diagnosing it.
So, Kathy, please add a Me Too.
Thanks, Frank.
Bruce Beacham
Andrew Shimmin
2008-09-27 22:49:15 UTC
Permalink
oops ... that should be:

When a table is opened with "use tableName" WITHOUT opening a new database it uses the default database.

regards, andrew
Post by Andrew Shimmin
Bruce,
FWIW, while figuring out how to set the BDE PrivateDirecory I discovered
the navigator uses the default database (database[1]) which is always
opened by dBase on start.
When you open a database with "d = new database()" it opens a new
database object (database[2]).
When a table is opened with "use tableName" with opening a new database
it uses the default database.
regards, andrew
Post by Bruce Beacham
Post by Frank J. Polan
open a BDE alias from Navigator
by selecting it in the Look-In box
Post by Frank J. Polan
open a table from Navigator
by double-clicking on it.
Post by Frank J. Polan
close table
by closing the browse window.
Post by Frank J. Polan
In command window type "Close Databases"
I get a MAV every time - anyone else see it
I too can confirm this in b.2083.
This is veerrry interesting to me. The window that opens when the
table name is double-clicked is not a normal browse window because it
is not using a table in the active area. (When the table window is
open, type DISP STAT in the command window: there are no open
tables). So when the table window is closed, quite possibly there
is some residue of the query still in existence. So perhaps when an
attempt is made to close the database, PLUS references some aspect of
the query and trips up on something.
The reason this is so interesting to me is that I have a bug that goes
back several years that relates to the closure of databases and which
I have been unable to reduce to a turnkey; I believe my case relates
to queries that have not been closed, despite my best efforts,
particularly in the context of several datamodules opened on one
database alias (each datamodule with its own database object). In my
case it is an OOP issue, not an XDML code issue.
So I believe that somewhere there is a bigger background problem, and
Frank may well have hit on a reliable simple was of diagnosing it.
So, Kathy, please add a Me Too.
Thanks, Frank.
Bruce Beacham
Bruce Beacham
2008-09-28 00:12:12 UTC
Permalink
Post by Andrew Shimmin
When a table is opened with "use tableName" WITHOUT opening a new
database it uses the default database.
Here's QAID 3298:

Add a database to _app.databases, release it, and _app.databases[1] is gone

***
? "Start."
?
? "empty(_app.databases[1]) ", empty(_app.databases[1])
? "Make new database, d."
d = new database("db2ksample")
? "Add it to _app.databases, so it is subscript[2]."
_app.databases.add(d)
? "Check that that is so:"
? "_app.databases[1] = d", _app.databases[1] = d
? "_app.databases[2] = d", _app.databases[2] = d
?
? "Release the new database."
release object d
?
? "Examine the result:"
if type("_app.databases[2]") = "O"
? "empty(_app.databases[2]) ", empty(_app.databases[2])
else
? "_app.databases[2] does not exist."
endif
? "empty(_app.databases[1]) ", empty(_app.databases[1])
?
? "_app.databases[1] has been released by the release of ";
+ "_app.databases[2]."
?

***



Bruce
Andrew Shimmin
2008-09-28 00:39:16 UTC
Permalink
OK ... I will remember that

regards, andrew
Post by Bruce Beacham
Post by Andrew Shimmin
When a table is opened with "use tableName" WITHOUT opening a new
database it uses the default database.
Add a database to _app.databases, release it, and _app.databases[1] is gone
***
? "Start."
?
? "empty(_app.databases[1]) ", empty(_app.databases[1])
? "Make new database, d."
d = new database("db2ksample")
? "Add it to _app.databases, so it is subscript[2]."
_app.databases.add(d)
? "Check that that is so:"
? "_app.databases[1] = d", _app.databases[1] = d
? "_app.databases[2] = d", _app.databases[2] = d
?
? "Release the new database."
release object d
?
? "Examine the result:"
if type("_app.databases[2]") = "O"
? "empty(_app.databases[2]) ", empty(_app.databases[2])
else
? "_app.databases[2] does not exist."
endif
? "empty(_app.databases[1]) ", empty(_app.databases[1])
?
? "_app.databases[1] has been released by the release of ";
+ "_app.databases[2]."
?
***
Bruce
kathy kolosky
2008-09-29 13:16:21 UTC
Permalink
It looks like this QAID could very well be related to this issue. (which I
have been able to re-produce).
I put a note in QAID 3298 and re-submitted the issue to R&D.

Thanks, Kathy
dBI
Post by Bruce Beacham
Post by Andrew Shimmin
When a table is opened with "use tableName" WITHOUT opening a new
database it uses the default database.
Add a database to _app.databases, release it, and _app.databases[1] is gone
***
? "Start."
?
? "empty(_app.databases[1]) ", empty(_app.databases[1])
? "Make new database, d."
d = new database("db2ksample")
? "Add it to _app.databases, so it is subscript[2]."
_app.databases.add(d)
? "Check that that is so:"
? "_app.databases[1] = d", _app.databases[1] = d
? "_app.databases[2] = d", _app.databases[2] = d
?
? "Release the new database."
release object d
?
? "Examine the result:"
if type("_app.databases[2]") = "O"
? "empty(_app.databases[2]) ", empty(_app.databases[2])
else
? "_app.databases[2] does not exist."
endif
? "empty(_app.databases[1]) ", empty(_app.databases[1])
?
? "_app.databases[1] has been released by the release of ";
+ "_app.databases[2]."
?
***
Bruce
Bruce Beacham
2008-09-29 14:29:59 UTC
Permalink
Post by kathy kolosky
It looks like this QAID could very well be related to this issue. (which I
have been able to re-produce).
I put a note in QAID 3298 and re-submitted the issue to R&D.
Just for clarification, can I ask: the note you've added is the
original MAV found by Frank?


Bruce
kathy kolosky
2008-09-30 14:03:27 UTC
Permalink
Just for clarification, can I ask: the note you've added is the original
MAV found by Frank?
Bruce
Yes.

- Kathy
Bruce Beacham
2008-10-01 07:48:57 UTC
Permalink
Just for clarification, can I ask: the note you've added is the original
MAV found by Frank?
Yes.
Thanks.


Bruce

Loading...