Board index » delphi » CacheUpdate with Sybase Sqlserver and Citrix Metaframe

CacheUpdate with Sybase Sqlserver and Citrix Metaframe

Hi,

I am using cache update to acces data store on a Sybase Sqlserver
When I open the table a file call 'Del1.MB' is created.
On a local machine a new file Delx.MB is created each time you run a new
insance of the program (x is automatically incremented)

BUT if I put my program on a NT4 Terminal Server with Citrix Metaframe
the first time the file Del1.MB is created

If another winstation launch the program (same login/password but different
machine)
there is a error message
Sharing violation
file c:\del1.MB
table c:\del1.MB
File or directory does not exist
c:\del1.MB

Do you know how those files are created and how the process know to
use a new Dellx.Mb or not

Thanks
Yves

 

Re:CacheUpdate with Sybase Sqlserver and Citrix Metaframe


Might be similiar.... Install Access application, had problems with temp
files. Needed to be careful and install the first user with: "change user
/install" executed from DOS command line. This apparently made the NT
registry handle it settings differently. For example, instead of saying a
temp.mdb was in c:\temp\temp.mdb, it set it to \\user\%temp%\temp\temp.mdb or
something like it. After I was done with the first user, I ran: "change user
/execute" at the DOS prompt. Then when I logged in as a user to run the
program, my temp references were user specific.  Some better detail on citrix
web site under "application installation".

In article <701rps$ip...@forums.borland.com>,
  "Yves Dieterich" <ites...@cge-ol.fr> wrote:

Quote
> Hi,

> I am using cache update to acces data store on a Sybase Sqlserver
> When I open the table a file call 'Del1.MB' is created.
> On a local machine a new file Delx.MB is created each time you run a new
> insance of the program (x is automatically incremented)

> BUT if I put my program on a NT4 Terminal Server with Citrix Metaframe
> the first time the file Del1.MB is created

> If another winstation launch the program (same login/password but different
> machine)
> there is a error message
> Sharing violation
> file c:\del1.MB
> table c:\del1.MB
> File or directory does not exist
> c:\del1.MB

> Do you know how those files are created and how the process know to
> use a new Dellx.Mb or not

> Thanks
> Yves

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:CacheUpdate with Sybase Sqlserver and Citrix Metaframe


As you suspect, the Del?.mb files are created by the BDE while a dataset in
cached updates is being edited.  I don't think you can change the name of
the files, but you can specify their location by setting Session.PrivateDir
prior to opening the database connection.

One possible route:  Create a uniquely named temporary folder when your app
starts, set Session.PrivateDir to it, and then delete the temporary folder
when your program terminates.  We do this for all our apps.  A unique name
can be guaranteed with GetTempFileName.  To guarantee write access, create
the folder underneath the Windows temporary folder, which determined using
GetTempPath.

V/R
Russell L. Smith

Quote
Yves Dieterich wrote in message <701rps$ip...@forums.borland.com>...
>Do you know how those files are created and how the process know to
>use a new Dellx.Mb or not

Re:CacheUpdate with Sybase Sqlserver and Citrix Metaframe


Yves,

My apologies for answering your message privately. I hit the wrong
button<g>.

You responded with:

Quote
>When you launch an application on the server you DONT run anything on your
>workstation. Everything is run on the server, you use only the resource of the server.
>The workstation use only the keyboard, the mouse and the screen (they can be
>diskless)

>so when my application is launched the file Del1.Mb is created on the server

...and that's the problem. Del*.MB files are assumed to be on the
workstation by default.

As Russell says, these files are created and managed by the BDE (a
black box to most of us mortals). As far as I know, the BDE API offers
only a couple of functions to turn cached updates on and off, so your
only hope is Russell's suggestion about Session.PrivateDir and his
clever use of temporary directories.

Unless, of course, there is some way to set Session.PrivateDir to
point back to the workstation, but I don't know what that would be.

Good luck.

Phil Cain

Re:CacheUpdate with Sybase Sqlserver and Citrix Metaframe


Thanks,
I was not able to create a temporary directory with the
GetTempFileName function since it create a file but
I create a temporary and it is ok

thanks again for this idea

Yves Dieterich

Russell L. Smith a crit dans le message
<707go1$qv...@forums.borland.com>...

Quote
>As you suspect, the Del?.mb files are created by the BDE while a dataset in
>cached updates is being edited.  I don't think you can change the name of
>the files, but you can specify their location by setting Session.PrivateDir
>prior to opening the database connection.

>One possible route:  Create a uniquely named temporary folder when your app
>starts, set Session.PrivateDir to it, and then delete the temporary folder
>when your program terminates.  We do this for all our apps.  A unique name
>can be guaranteed with GetTempFileName.  To guarantee write access, create
>the folder underneath the Windows temporary folder, which determined using
>GetTempPath.

>V/R
>Russell L. Smith

>Yves Dieterich wrote in message <701rps$ip...@forums.borland.com>...
>>Do you know how those files are created and how the process know to
>>use a new Dellx.Mb or not

Re:CacheUpdate with Sybase Sqlserver and Citrix Metaframe


Use the GetTempFileName to create a unique file name (uUnique = 0).  Then
delete the file and immediately create a directory with the same name.  This
is the easiest method that guarantees a unique directory name.

V/R
Russell L. Smith

Quote
Yves Dieterich wrote in message <70mpp9$k...@forums.borland.com>...
>I was not able to create a temporary directory with the
>GetTempFileName function since it create a file but

Other Threads