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 

Parado simultaned access

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Jmontes
Guest





PostPosted: Fri Jul 23, 2004 12:38 am    Post subject: Parado simultaned access Reply with quote



Hi

its possible 2 aplications have access at the same time in paradox
table


Thanks

--
Julian Andres Montes
Tracker do Brasil


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.725 / Virus Database: 480 - Release Date: 7/19/2004


Back to top
Jayme Jeffman Filho
Guest





PostPosted: Mon Jul 26, 2004 1:52 pm    Post subject: Re: Parado simultaned access Reply with quote



Hello Montes,

Yes it is. There are some important tasks to do before having the system
working on a network :

1. All users must have at least read (file scan) access right on the network
directory where the Paradox tables are saved.
2. All users must have read and modify access right on a network directory
where the "pdoxusrs.net" file is saved, it can be any where on the network.
3. The first time the application run will create two control files in the
same Paradox tables directory : "paradox.lck" and "pdoxusrs.lck", so, this
user must have "create file" access right on the Paradox tables directory.
Attention : These files will be deleted when the application ends, so, if
the other users do not have file creation access right on this directory,
the delete file access right must be revoked from the first user to prevent
the deletion of the files when the application ends up.
4. One of the "lck" files have the "pdoxusrs.net" file location registered
in it, so if you use mapped network drives all the workstations should be
mapped to the same "letter" otherwise you'll get a "Another Pdoxusrs.net
file is in use" error message. The UNC format (\Severrootdirectory) is
supported by Paradox-BDE, so you don't need to map any network directory.
5. The application should configure the TSession::NetFileDir property before
open the database connection.

The code lines bellow I use in my Paradox-BDE applications to set up the
NetFileDir session parameter :

........
// Be sure the database is closed.
Database->Close(); // Database is a TDatabase component
// pvtDir maps to a local directory C:Windows|temp for example
Session->PrivateDir = pvtDir ; // Session is the default session
// cApplPath = ExtractFilePath(Application->ExeName)
if(DirectoryExists( cApplPath + String("NetDir\")))
Session->NetFileDir = cApplPath + String("NetDir\") ;
else{
ShowMessage(String("Diretório ") +cApplPath + String("NetDirnNão
existe!"));
exit(EXIT_FAILURE);
}

Database->Params->Clear();
// cDataApplPath is the network directory which contains the Paradox tables
Database->Params->Add(String("PATH=")+cDataApplPath);
Database->Params->Add("DEFAULT DRIVER=PARADOX");
Database->Params->Add("ENABLE BCD=FALSE");

try{
Database->Open();
}
catch(...){
ShowMessage("Dados indisponíveis!");
exit(EXIT_FAILURE);
}
..........

HTH

Jayme.


"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:41005e21 (AT) newsgroups (DOT) borland.com...
Quote:
Hi

its possible 2 aplications have access at the same time in paradox
table


Thanks

--
Julian Andres Montes
Tracker do Brasil


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.725 / Virus Database: 480 - Release Date: 7/19/2004





Back to top
Jmontes
Guest





PostPosted: Tue Jul 27, 2004 2:07 am    Post subject: Re: Parado simultaned access Reply with quote



Oi jaime
obrigado por sua resposta

Meu problema acho que es mas simple.

Eu tenho uma apliacao com 2 tablas em paradox, e quiero facer uma
otra apliacacao que trabalhe
com essas 2 tablas e trabalhe em o mismo pc.

1 Es necesario usar um componente tsession?
2.tenho que usar uma componente tdatabase?
3 tenho que facer configuracao de um netdir (fican en o mismo pc).


sim trabalho so com uma aplicacao e sim essas componentes,nao tenho
problemas do concorrencia.


Obrigado
--
Julian Andres Montes
Tracker do Brasil
"Jayme Jeffman Filho" <jaymenosp (AT) jeffman (DOT) eng.br> escribió en el mensaje
news:41050aa3$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello Montes,

Yes it is. There are some important tasks to do before having the system
working on a network :

1. All users must have at least read (file scan) access right on the
network
directory where the Paradox tables are saved.
2. All users must have read and modify access right on a network directory
where the "pdoxusrs.net" file is saved, it can be any where on the
network.
3. The first time the application run will create two control files in the
same Paradox tables directory : "paradox.lck" and "pdoxusrs.lck", so, this
user must have "create file" access right on the Paradox tables directory.
Attention : These files will be deleted when the application ends, so, if
the other users do not have file creation access right on this directory,
the delete file access right must be revoked from the first user to
prevent
the deletion of the files when the application ends up.
4. One of the "lck" files have the "pdoxusrs.net" file location registered
in it, so if you use mapped network drives all the workstations should be
mapped to the same "letter" otherwise you'll get a "Another Pdoxusrs.net
file is in use" error message. The UNC format (\Severrootdirectory) is
supported by Paradox-BDE, so you don't need to map any network directory.
5. The application should configure the TSession::NetFileDir property
before
open the database connection.

The code lines bellow I use in my Paradox-BDE applications to set up the
NetFileDir session parameter :

.......
// Be sure the database is closed.
Database->Close(); // Database is a TDatabase component
// pvtDir maps to a local directory C:Windows|temp for example
Session->PrivateDir = pvtDir ; // Session is the default session
// cApplPath = ExtractFilePath(Application->ExeName)
if(DirectoryExists( cApplPath + String("NetDir\")))
Session->NetFileDir = cApplPath + String("NetDir\") ;
else{
ShowMessage(String("Diretório ") +cApplPath + String("NetDirnNão
existe!"));
exit(EXIT_FAILURE);
}

Database->Params->Clear();
// cDataApplPath is the network directory which contains the Paradox
tables
Database->Params->Add(String("PATH=")+cDataApplPath);
Database->Params->Add("DEFAULT DRIVER=PARADOX");
Database->Params->Add("ENABLE BCD=FALSE");

try{
Database->Open();
}
catch(...){
ShowMessage("Dados indisponíveis!");
exit(EXIT_FAILURE);
}
.........

HTH

Jayme.


"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:41005e21 (AT) newsgroups (DOT) borland.com...
Hi

its possible 2 aplications have access at the same time in
paradox
table


Thanks

--
Julian Andres Montes
Tracker do Brasil


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.725 / Virus Database: 480 - Release Date: 7/19/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004



Back to top
Jayme Jeffman Filho
Guest





PostPosted: Tue Jul 27, 2004 12:11 pm    Post subject: Re: Parado simultaned access Reply with quote

Hello Montes,

You can have both applications working simultaneously on the same PC.
You don't have to use a TSession object, neither configure a NetFileDir.
You only need a TDatabase if you don't have a BDE alias to the database
you are conneting on. You can try to open the same database table using
the Borland's DBExplorer and the Database Desktop applications at the
same time, so you can do the same.

HTH

Jayme.

"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:4105b8fe (AT) newsgroups (DOT) borland.com...
Quote:
Oi jaime
obrigado por sua resposta

Meu problema acho que es mas simple.

Eu tenho uma apliacao com 2 tablas em paradox, e quiero facer uma
otra apliacacao que trabalhe
com essas 2 tablas e trabalhe em o mismo pc.

1 Es necesario usar um componente tsession?
2.tenho que usar uma componente tdatabase?
3 tenho que facer configuracao de um netdir (fican en o mismo pc).


sim trabalho so com uma aplicacao e sim essas componentes,nao tenho
problemas do concorrencia.


Obrigado
--
Julian Andres Montes
Tracker do Brasil




Back to top
Jmontes
Guest





PostPosted: Wed Jul 28, 2004 12:10 am    Post subject: Re: Parado simultaned access Reply with quote

Hi, i open one aplication whit database desktop and dont work , have
the same error

Directory is controlled by other . NET file.


--
Julian Andres Montes
Tracker do Brasil
"Jayme Jeffman Filho" <jaymenosp (AT) jeffman (DOT) eng.br> escribió en el mensaje
news:41064454$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello Montes,

You can have both applications working simultaneously on the same PC.
You don't have to use a TSession object, neither configure a NetFileDir.
You only need a TDatabase if you don't have a BDE alias to the database
you are conneting on. You can try to open the same database table using
the Borland's DBExplorer and the Database Desktop applications at the
same time, so you can do the same.

HTH

Jayme.

"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:4105b8fe (AT) newsgroups (DOT) borland.com...
Oi jaime
obrigado por sua resposta

Meu problema acho que es mas simple.

Eu tenho uma apliacao com 2 tablas em paradox, e quiero facer uma
otra apliacacao que trabalhe
com essas 2 tablas e trabalhe em o mismo pc.

1 Es necesario usar um componente tsession?
2.tenho que usar uma componente tdatabase?
3 tenho que facer configuracao de um netdir (fican en o mismo pc).


sim trabalho so com uma aplicacao e sim essas componentes,nao tenho
problemas do concorrencia.


Obrigado
--
Julian Andres Montes
Tracker do Brasil





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.727 / Virus Database: 482 - Release Date: 7/26/2004





Back to top
Jmontes
Guest





PostPosted: Wed Jul 28, 2004 12:52 am    Post subject: Re: Parado simultaned access Reply with quote

Hi, i open one aplication whit database desktop and dont work , have
the same error

Directory is controlled by other . NET file.


--
Julian Andres Montes
Tracker do Brasil
"Jayme Jeffman Filho" <jaymenosp (AT) jeffman (DOT) eng.br> escribió en el mensaje
news:41064454$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello Montes,

You can have both applications working simultaneously on the same PC.
You don't have to use a TSession object, neither configure a NetFileDir.
You only need a TDatabase if you don't have a BDE alias to the database
you are conneting on. You can try to open the same database table using
the Borland's DBExplorer and the Database Desktop applications at the
same time, so you can do the same.

HTH

Jayme.

"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:4105b8fe (AT) newsgroups (DOT) borland.com...
Oi jaime
obrigado por sua resposta

Meu problema acho que es mas simple.

Eu tenho uma apliacao com 2 tablas em paradox, e quiero facer uma
otra apliacacao que trabalhe
com essas 2 tablas e trabalhe em o mismo pc.

1 Es necesario usar um componente tsession?
2.tenho que usar uma componente tdatabase?
3 tenho que facer configuracao de um netdir (fican en o mismo pc).


sim trabalho so com uma aplicacao e sim essas componentes,nao tenho
problemas do concorrencia.


Obrigado
--
Julian Andres Montes
Tracker do Brasil





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.727 / Virus Database: 482 - Release Date: 7/26/2004







Back to top
Jayme Jeffman Filho
Guest





PostPosted: Wed Jul 28, 2004 12:17 pm    Post subject: Re: Parado simultaned access Reply with quote

Hello Montes,

There must be two ".lck" files in the same directory of your Paradox tables,
delete them and try again, do not set the Session->NetFileDir, leave BDE
control the database access.
By the way, are your Paradox tables placed in the same workstation where
you're running your applications ? If no, you must deal with them as you
were in a network environment.

HTH

Jayme.

"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:4106f8d3 (AT) newsgroups (DOT) borland.com...
Quote:
Hi, i open one aplication whit database desktop and dont work , have
the same error

Directory is controlled by other . NET file.


--
Julian Andres Montes
Tracker do Brasil
"Jayme Jeffman Filho" <jaymenosp (AT) jeffman (DOT) eng.br> escribió en el mensaje
news:41064454$1 (AT) newsgroups (DOT) borland.com...
Hello Montes,

You can have both applications working simultaneously on the same PC.
You don't have to use a TSession object, neither configure a NetFileDir.
You only need a TDatabase if you don't have a BDE alias to the database
you are conneting on. You can try to open the same database table using
the Borland's DBExplorer and the Database Desktop applications at the
same time, so you can do the same.

HTH

Jayme.

"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:4105b8fe (AT) newsgroups (DOT) borland.com...
Oi jaime
obrigado por sua resposta

Meu problema acho que es mas simple.

Eu tenho uma apliacao com 2 tablas em paradox, e quiero facer
uma
otra apliacacao que trabalhe
com essas 2 tablas e trabalhe em o mismo pc.

1 Es necesario usar um componente tsession?
2.tenho que usar uma componente tdatabase?
3 tenho que facer configuracao de um netdir (fican en o mismo pc).


sim trabalho so com uma aplicacao e sim essas componentes,nao tenho
problemas do concorrencia.


Obrigado
--
Julian Andres Montes
Tracker do Brasil





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.727 / Virus Database: 482 - Release Date: 7/26/2004







Back to top
Dwayne
Guest





PostPosted: Wed Jul 28, 2004 8:26 pm    Post subject: Re: Parado simultaned access Reply with quote

Hello Jmontes,

J>>Hi, i open one aplication whit database desktop and dont work , have
the same error
Directory is controlled by other . NET file.
<<

Delete your paroxusr.net files (there should be two of them). What
is happening, is someone has either reset their computer, or a loss of power
has happened before a person closed your program. Thus Pardox thinks a
person is still in that record you are trying to open.

Dwayne



Back to top
Jmontes
Guest





PostPosted: Thu Jul 29, 2004 1:09 am    Post subject: Re: Parado simultaned access Reply with quote

Hi i have one close application (from other enterprise) i wanna do an
application runing im background
and work whit the sames tables.

Database Desktop dont work in the same time, one application can have
exclusive access
to the tables???


Thanks


--
Julian Andres Montes
Tracker do Brasil
"Dwayne" <myfrienddr (AT) yahoo (DOT) com> escribió en el mensaje
news:4107e024$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello Jmontes,

J>>Hi, i open one aplication whit database desktop and dont work ,
have
the same error
Directory is controlled by other . NET file.


Delete your paroxusr.net files (there should be two of them).
What
is happening, is someone has either reset their computer, or a loss of
power
has happened before a person closed your program. Thus Pardox thinks a
person is still in that record you are trying to open.

Dwayne





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.727 / Virus Database: 482 - Release Date: 7/26/2004



Back to top
Jayme Jeffman Filho
Guest





PostPosted: Thu Jul 29, 2004 12:28 pm    Post subject: Re: Parado simultaned access Reply with quote

Yes it can, and it might have been setting the NetFileDir parameter as well.
So you need to know more details about the behavior of the close
application.

HTH

Jayme.

"Jmontes" <one1 (AT) tutopia (DOT) com> escreveu na mensagem
news:41084e4b (AT) newsgroups (DOT) borland.com...
Quote:

Hi i have one close application (from other enterprise) i wanna do an
application runing im background
and work whit the sames tables.

Database Desktop dont work in the same time, one application can have
exclusive access
to the tables???


Thanks


--
Julian Andres Montes
Tracker do Brasil
"Dwayne" <myfrienddr (AT) yahoo (DOT) com> escribió en el mensaje
news:4107e024$1 (AT) newsgroups (DOT) borland.com...
Hello Jmontes,

J>>Hi, i open one aplication whit database desktop and dont work ,
have
the same error
Directory is controlled by other . NET file.


Delete your paroxusr.net files (there should be two of them).
What
is happening, is someone has either reset their computer, or a loss of
power
has happened before a person closed your program. Thus Pardox thinks a
person is still in that record you are trying to open.

Dwayne





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.727 / Virus Database: 482 - Release Date: 7/26/2004





Back to top
Dwayne
Guest





PostPosted: Mon Aug 02, 2004 6:32 pm    Post subject: Re: Parado simultaned access Reply with quote

Jmontes>>Hi i have one close application (from other enterprise) i wanna
do an application runing im background
and work whit the sames tables.

Database Desktop dont work in the same time, one application can have
exclusive access to the tables???<<

Dbase Desktop will work at the same time.

Are you sure your application is closing the files correctly, and not
leaving them open from a bad exit?
Are you sure your application is set for file sharing, and not
exclusively for that one application?


Dwayne


Back to top
Jayme Jeffman Filho
Guest





PostPosted: Mon Aug 02, 2004 7:13 pm    Post subject: Re: Parado simultaned access Reply with quote

Hello Montes,

There is a way to check if the application is setting the NetFileDir
property or not :
1. Open the BDE Administrator, the link icon is in the Control Panel window.
2. Select the "Configuration" tab.
3. Open the "Drivers" tree view node.
4. Open the "Native" tree view node. Select the "PARADOX" tree view node.
5. You can now check where is located the default NetFileDir directory.
6. Close all BDE applications and delete all pdoxusrs.net files you can find
in your workstation. Delete the lck files too.
7. Run the application you'd like to know where it's NetFileDir is located
in ( that one you've named "close").
8. Find where was created the "pdoxusrs.net" file . If the directory is the
same of your default setting, the application probably is not setting the
NetFileDir property.
9. Try to open any of the tables that may be in use by the application using
DBExplorer and check if the concurrence is possible.

For further information you can check the BDE Administrator help file,
shipped with C++Builder.

HTH

Jayme.




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder 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.