On 1/24/2012 11:40 AM, Jeff Johnson wrote: > > I have two DBC's with the same file name in them. Everything works okay > except for checking if a specific file is being used(). > > Example: > open database dbc1 > set database to dbc1 > use dbc1.filename > > open database dbc2 > set database to dbc2 > > ?used('filename') returns .t. but it is dbc1 > > Is there any way to check to see if dbc2!filename is being used? > > Please don't suggest that I change the file name. It is only one file > and I would have to change too much code to change it. > > >
Well, first let me say that I feel for you. I had a situation years ago (before 2000) where I had the same dbc name but in different paths (like a backup copy). Trying to navigate between the 2 dbcs was a huge pain. Similar to your pain now. Are the tables in the same path as the owning dbc? If so, you might look at the path of the opened table via some UDF you create. IF CHECKUSED("MyTable") ..... where you create a function called CHECKUSED that checks the path beyond the initial USED(cTable) check. hth, --Mike -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16 _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/4f1ee1b0.50...@mbsoftwaresolutions.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.