Hitman99


Can any of you Foxpro experts help me I am involved in deploying network systems, and am often called on to publish Visual Foxpro apps through Citrix/TS to many users. To do this I am told that I must give each user an individual copy of the DBC file, which is a major pain since it then has to be copied to every user and consequently updated individually.

Forgive me if this is a stupid question as I am no Foxpro expert, but is it not possible to have a single instance of this with multiple access to cut down on the amount of work involved to deploy a simple program The backend runs on SQL so it is a simple job to create a system DSN ODBC for all users, and the application has a single .exe which all users share. It is only these pesky DBC files that cause grief.

Any advice gratefully received. Reward offered for valid solution as this will give me back years of my life to do more enjoyable things.




Re: DBCs and Citrix/ Terminal Server

dni


You may try to put dbc file on a server and try to connect using a connection string like:

http://www.connectionstrings.com/ carrier=visualfoxpro







Re: DBCs and Citrix/ Terminal Server

Cindy Winegarden

Hi Hitman,

I haven't worked specifically with Citrix, but ordinarily Fox DBCs and DBFs are located on a file server and shared by all, as long as SET EXCLUSIVE is OFF, which is usually the case. However, since you've got data on a SQL Server that the Fox app is accessing, I suspect that this access is provided by VFP views, with the view definition stored in the DBC. (A DBC is a "database container" which has metadata such as view definitions, stored procedures, etc. about the Fox data.)

With large numbers of users it increases performance when each client its own copy of the DBC. This is done because each time a user opens a view the view definition in the DBC is locked briefly. You can read a discussion of this issue at http://fox.wikis.com/wc.dll Wiki~CreatingDBCforViews~VFP .

So, the developer of the app has made a design choice that makes the experience better for the users, and unfortunately it makes your job more difficult.







Re: DBCs and Citrix/ Terminal Server

MarciaAkins

Can any of you Foxpro experts help me I am involved in deploying network systems, and am often called on to publish Visual Foxpro apps through Citrix/TS to many users. To do this I am told that I must give each user an individual copy of the DBC file, which is a major pain since it then has to be copied to every user and consequently updated individually.

I presume that the reason for this is because of the contention that occurs when openning the remote views. With lots of users trying to open them at the same time, if they are trying to access the same DBC, VFP will throw error 1709 - Database Object is in use by somebody else.

The only alternative is to go with a data access solution that does not use remote views. One alternative is to use a set of data classes like the ones you can download from the Tools and Utilities page of our web site: http://www.tightlinecomputers.com and use them instead. These classes are merely a wrapper around SQL Passthru.






Re: DBCs and Citrix/ Terminal Server

jmom

This looks like something I could check out for my post. Thanks for the link.



Re: DBCs and Citrix/ Terminal Server

AndyKr

As Marcia points out the reason for giving users their own copy of the DBC is to avoid the contention issue when accessing views. So if you are not using Remote Views than you don't need to give the DBC to each user. If you are, then the trick we used before was to create a DBC that contains ONLY the view definitions. A master copy of this is located on the file server and, at applicaiton startup this DBC is copied locally to the user's machine - overwriting any prior version that may exist. Since this ONLY contains view definitions it is small and fast to copy. This way you have 'local runtime' copies of the view definitions, but only one copy to maintain.

Of course, if your DBC currently contains both View and Table data, then you will have to modify the app to open TWO DBCs at startup and ensure that the correct DBC is selected when necessary (NB: not needed for accessing data, but essential when using commands that require a DBC to be 'current' - like ADBOBJECTS())

Alternatively you can adopt the strategy suggested by Marcia and use the Tightline Data Classes....






Re: DBCs and Citrix/ Terminal Server

MarciaAkins

Hi Andy.

Of course, if your DBC currently contains both View and Table data, then you will have to modify the app to open TWO DBCs at startup and ensure that the correct DBC is selected when necessary

I think that this is only remote views because this application is using SQL Server data < s >.