?
Solved

Terminal Services and Paradox DB

Posted on 2005-04-26
10
Medium Priority
?
837 Views
Last Modified: 2010-04-04
Hi! I have an app developed in Delphi 6 with Paradox DB, I want to run my app in my server with Win2003 Sever operating system accessing by terminal server, but I have a problem when more than one user access the same application's option , if one of them change and save data and the second user do the same, the first user's changes lost, just change maked by the second user persist.

   I think TS make a virtual sesion with a database copy, when user save his/her changes TS replace all database file not just the records affected.

     Tnksfor your help.

    I'm sorry my English.
0
Comment
Question by:chechomoon
  • 5
  • 4
10 Comments
 
LVL 6

Expert Comment

by:vadim_ti
ID: 13869645
Check BDE settings

must be
LOCALSHARE=TRUE

but default is
LOCALSHARE=FALSE
0
 

Author Comment

by:chechomoon
ID: 13872477

 Thanks vadim_ti, i set LOCALSHARE =TRUE, and it solved the problem with two user over the same app's option, but it generate another error message when I try to access other app

      Directory is controlled by other .NET file
      Directory: C:\x\y\z
      File: C:\x\y\PDOXUSRS.LCK

   and don't let me execute the app2... app1 and app2 are in the same directory, and the BDE Setting NET Dir = C:\x\y\netdir, this dir contained the file PDOXUSRS.LCK ,

   I access the app1 correctly, but when a try to run app2 over the same Terminal service Sesion , it show me that msg,

      Thnks for your help

0
 

Author Comment

by:chechomoon
ID: 13872481
Thanks vadim_ti, i set LOCALSHARE =TRUE, and it solved the problem with two user over the same app's option, but it generate another error message when I try to access other app

      Directory is controlled by other .NET file
      Directory: C:\x\y\z
      File: C:\x\y\PDOXUSRS.LCK

   and don't let me execute the app2... app1 and app2 are in the same directory, and the BDE Setting NET Dir = C:\x\y\netdir, this dir contained the file PDOXUSRS.LCK ,

   I access the app1 correctly, but when a try to run app2 over the same Terminal service Sesion , it show me that msg,

      Thnks for your help
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 13873437
usual the netdir should be pointed to a directory,
which is shared with full access rights to all clients

also the pathname should be for all clients exactly the same entry

-> you cannot have this netdir local for each client

meikl  ;-)
0
 
LVL 6

Expert Comment

by:vadim_ti
ID: 13873960
i think you can try next
1) delete all PDOX*.LCK files and PDOX*.NET files
2) if you have Data Module and TDataBase component, assign NetDir and PrivateDir of TDatabase in OnCreate Datamodule event



    PrivDir := 'C:\x\y\'+IntToHex(GetCurrentThreadId, 8);
    if not DirectoryExists(PrivDir) then
      ForceDirectories(PrivDir);
    DB.Params.Clear;
    DB.Params.Add('PATH=' + pathToDB);
    DB.Session.NetFileDir := GetCurrentDir;
    DB.Session.PrivateDir := PrivDir;
    DB.Connected := TRUE;

PrivDir must be unique for every session, you can use GUID or something else, in example i used GetCurrentThreadId
NetFileDir must be common for all sessions working with the same database
0
 

Author Comment

by:chechomoon
ID: 13878394

  Ok guys Thanks so mouch for your help,

  but  I still have the problem, I have two delphi app's (app1, app2) that use Paradox DB. I want to run my app's in my Server Win2003 via Terminal Services, my two app's use the same DB.

   My first problem was... when more than one user access the same application's option (app1) , if one of them change and save data and the second user do the same, the first user's changes lost, just change maked by the second user persist'

   I set DBE Settings   'LOCALSHARE=True' and set 'NetDir' to shared dir with full access, and it works... but it generated other problem, when I try to run app2 I get an error msg

      Directory is controlled by other .NET file
      Directory: C:\x\y\z
      File: C:\x\y\PDOXUSRS.LCK

   (I coneccted to my server such as administratror)

   then I set back LOCALSHARE=False, and it fix the problem, but I get back to original problem

   Please Help me!!

   chechomoon
0
 
LVL 6

Accepted Solution

by:
vadim_ti earned 1500 total points
ID: 13878606
Please make next:

delete all PDOX*.LCK, PDOX*.NET files

create new directories
lets say
C:\X\NET
C:\X\PRIVATE\APP1
C:\X\PRIVATE\APP2

in your first application

TDatabase1.Connected := false;
TDatabase1.Session.Netdir := 'C:\X\NET';
TDatabase1.Session.Privatedir := 'C:\X\PRIVATE\APP1';

in your second application

TDatabase1.Connected := false;
TDatabase1.Session.Netdir := 'C:\X\NET';
TDatabase1.Session.Privatedir := 'C:\X\PRIVATE\APP2';

run your 2 applications simultaneously and please post error message you will get
0
 

Author Comment

by:chechomoon
ID: 13881293

 Ok, I created direcotries

      C:\NET \
      C:\ dir_X \ app1 \
      C:\ dir_X \ app2 \

   and I did what you suggest

in first application

TDatabase1.Connected := false;
TDatabase1.Session.Netdir := 'C:\dir_x\ NET';
TDatabase1.Session.Privatedir := 'C:\dir_x\APP1';

in second application

TDatabase1.Connected := false;
TDatabase1.Session.Netdir := 'C:\dir_x\NET';
TDatabase1.Session.Privatedir := 'C:\dir_x\APP2';

   I run my app1 and it run correctly, but when I try to run app2 I get the same message

 Directory is controlled by other .NET file
 Directory: C:\ dir_x \ app2 \
 File: C:\ dir_x \ app2 \ PDOXUSRS.LCK

 Thanks for your help
 
0
 

Author Comment

by:chechomoon
ID: 13881893

   Ok, I got it, I set NetDir to the application default dir, it fix the problem and let me run my two app's,

    Thanks for your help.

   chechomoon

0
 
LVL 6

Expert Comment

by:vadim_ti
ID: 13884463
it is like a problem was with spaces in directory name
i replaced spaces with stars
paradox compare net directory name literally

 Directory is controlled by other .NET file
 Directory: C:\*dir_x*\*app2*\
 File: C:\*dir_x*\*app2*\*PDOXUSRS.LCK
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Screencast - Getting to Know the Pipeline
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question