BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tdatabase

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Howard Koch
Guest





PostPosted: Thu Mar 02, 2006 9:03 am    Post subject: Tdatabase Reply with quote



Hi,
D7 BDE
If no TDatabase is used at design time I understand that a default one is
created. Is this done at design time or run time and what are the defaults?
I see from the Tdatase that is dropped onto a form that login prompt = true
but when I run an application without a Tdatabase there is no login prompt
required.

If my application accesses two different databases are 2 Tdatabase
components created.


Thanks
Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Thu Mar 02, 2006 5:03 pm    Post subject: Re: Tdatabase Reply with quote



Howard Koch wrote:
Quote:
If no TDatabase is used at design time I understand that a default
one is created. Is this done at design time or run time and what are
the defaults? I see from the Tdatase that is dropped onto a form that
login prompt = true but when I run an application without a Tdatabase
there is no login prompt required.

It is necessary at both design time - if yout want to make a dataset active
then - and at run time. The actual process is that there is a defaul
TSession component created whether you drop one down or not. When you try to
connect a dataset, it requests a connection to the alias or database path
specified from the Session. The session checks if there is a database
component for that and, if not, creates one for you. TSession can manage a
list of TDatabase components.

Quote:
If my application accesses two different databases are 2 Tdatabase
components created.

Yes - the TSession checks to see if one is needed for the dataset you are
opening.

LoginPrompt always defaults to true, it is ignored if it is able to
determine that it is not necessary - which it can do in the case of Paradox
and Dbase tables. That is true whether you explicitly create your own
TDatabase or not.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
"In a tornado, even turkeys can fly." - unknown
Back to top
Bill Todd
Guest





PostPosted: Thu Mar 02, 2006 6:03 pm    Post subject: Re: Tdatabase Reply with quote



Howard Koch wrote:

Quote:
All worked fine for 5 years until one client failed and was replaced
with xp home. The xp home pc must load the applications first
otherwise there is a file lock error on the pdoxlock file.

This is a well known problem with the BDE. The only known solution is
to use a PC running XP as the server. Since Borland stopped developing
and maintaining the BDE several years ago you might want to consider
moving to another database access layer.

--
Bill Todd (TeamB)
Back to top
Howard Koch
Guest





PostPosted: Thu Mar 02, 2006 6:03 pm    Post subject: Re: Tdatabase Reply with quote

thanks. I ask because I have a problem with the BDE and xp home on a
network. I have a server running 98se and 98se clients. I have 4 databases
on the server which are accessed by 4 different applications, 3 application
accesses two databases and 1 application just accesses 1 database. 1 of the
databases is common to all applications. There is a common netdir on the
server. All worked fine for 5 years until one client failed and was replaced
with xp home. The xp home pc must load the applications first otherwise
there is a file lock error on the pdoxlock file.

I added a Tdatabase component to the main application and now the xp client
does not have to be the first to load. However, if I try to load the other
application when they are running elsewhere they fail on the lock file made
in the database dir. Hence the question about the Tdatabase component. so I
added this to the other applications but it made no difference. so finally I
renamed all the tables and put them in the main db dir reset the paths in
the application and now the xp computer does not have to load them first!
Does any one know what is going on? The 98se server has the whole c: shared
and it shows in the XP's network places.

Any thoughts would be appreciated.
"Wayne Niddery [TeamB]" <wniddery (AT) chaffaci (DOT) on.ca> wrote in message
news:44071973$2 (AT) newsgroups (DOT) borland.com...
Quote:
Howard Koch wrote:
If no TDatabase is used at design time I understand that a default
one is created. Is this done at design time or run time and what are
the defaults? I see from the Tdatase that is dropped onto a form that
login prompt = true but when I run an application without a Tdatabase
there is no login prompt required.

It is necessary at both design time - if yout want to make a dataset
active
then - and at run time. The actual process is that there is a defaul
TSession component created whether you drop one down or not. When you try
to
connect a dataset, it requests a connection to the alias or database path
specified from the Session. The session checks if there is a database
component for that and, if not, creates one for you. TSession can manage a
list of TDatabase components.

If my application accesses two different databases are 2 Tdatabase
components created.

Yes - the TSession checks to see if one is needed for the dataset you are
opening.

LoginPrompt always defaults to true, it is ignored if it is able to
determine that it is not necessary - which it can do in the case of
Paradox
and Dbase tables. That is true whether you explicitly create your own
TDatabase or not.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
"In a tornado, even turkeys can fly." - unknown

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.