Index
2012-01-24 11:40Jeff Johnson : Two DBC's with the same file name
2012-01-24 11:52MB Software Solutions, LLC : Re: Two DBC's with the same file name
2012-01-24 11:53Tracy Pearson : RE: Two DBC's with the same file name
2012-01-24 11:56John Weller : RE: Two DBC's with the same file name
2012-01-24 11:56Peter Cushing : Re: Two DBC's with the same file name
2012-01-24 11:59Wally Noll : RE: Two DBC's with the same file name
2012-01-24 12:00Jeff Johnson : Re: Two DBC's with the same file name
2012-01-24 12:10Wally Noll : RE: Two DBC's with the same file name
2012-01-24 12:16Jeff Johnson : Re: Two DBC's with the same file name
2012-01-24 12:31Jeff Johnson : Re: Two DBC's with the same file name
Back to top
Two DBC's with the same file name

Author: Jeff Johnson

Posted: 2012-01-24 11:40:33   Link

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.

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

_______________________________________________

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/4F1EDF01.3060306@san-dc.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.

©2012 Jeff Johnson
Back to top
Re: Two DBC's with the same file name

Author: MB Software Solutions, LLC

Posted: 2012-01-24 11:52:00   Link

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.50409@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.

©2012 MB Software Solutions, LLC
Back to top
RE: Two DBC's with the same file name

Author: Tracy Pearson

Posted: 2012-01-24 11:53:01   Link

Jeff Johnson wrote on 2012-01-24:

>

> 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.

>

>

Jeff,

You can use the DBF() to find its path. Then DBC() to find its path. As long

as they are in the same location, this may work.

Though DBGetProp() for the Table would be able to give you the right DBF()

value.

Tracy Pearson

PowerChurch Software

_______________________________________________

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/000701ccdab8$a22c1f60$e6845e20$@powerchurch.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.

©2012 Tracy Pearson
Back to top
RE: Two DBC's with the same file name

Author: John Weller

Posted: 2012-01-24 11:56:22   Link

WAG - can you qualify the filename with the dbc name? IF

USED(dbc2.filename)

John Weller

01380 723235

07976 393631

> -----Original Message-----

> From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf

> Of Jeff Johnson

> Sent: 24 January 2012 16:41

> To: profoxtech@leafe.com

> Subject: Two DBC's with the same file name

>

>

> 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.

>

>

>

> --

> Jeff

>

> ---------------

>

> Jeff Johnson

> jeff@san-dc.com

> (623) 582-0323

>

> www.san-dc.com

>

>

[excessive quoting removed by server]

_______________________________________________

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/007c01ccdab9$1aa975a0$4ffc60e0$@co.uk

** 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.

©2012 John Weller
Back to top
Re: Two DBC's with the same file name

Author: Peter Cushing

Posted: 2012-01-24 11:56:57   Link

You could use DBF('filealias') and check the path and presumably that

will show the difference.

HTH

* Peter Cushing *

IT development and support

Signature

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.

>

>

>

>

----------------------------------------------------------------

Rajan Imports has changed - we are now Whispering Smith Ltd. For more information see our website at www.whisperingsmith.com

Please update your address book with my new email address: pcushing@whisperingsmith.com

.

This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or

disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.

www.whisperingsmith.com

Whispering Smith Ltd

Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715

London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960

_______________________________________________

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/4F1EE2D9.9090408@whisperingsmith.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.

©2012 Peter Cushing
Back to top
RE: Two DBC's with the same file name

Author: Wally Noll

Posted: 2012-01-24 11:59:54   Link

Jeff,

I'm pretty sure that CURSORGETPROP function can give you that answer. I

know I've done it, but not handy with code now as I haven't done programming

for years. But I'm sure it'll do it.

Wally Noll

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf

Of Jeff Johnson

Sent: Tuesday, January 24, 2012 9:41 AM

To: profox@leafe.com

Subject: Two DBC's with the same file name

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.

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

[excessive quoting removed by server]

_______________________________________________

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/23C6EF827D964FFF9FE4972CF13C8B96@user834aaa3cd0

** 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.

©2012 Wally Noll
Back to top
Re: Two DBC's with the same file name

Author: Jeff Johnson

Posted: 2012-01-24 12:00:24   Link

On 01/24/2012 09:53 AM, Tracy Pearson wrote:

> Jeff Johnson wrote on 2012-01-24:

>> 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.

>>

>>

> Jeff,

>

> You can use the DBF() to find its path. Then DBC() to find its path. As long

> as they are in the same location, this may work.

> Though DBGetProp() for the Table would be able to give you the right DBF()

> value.

>

>

> Tracy Pearson

> PowerChurch Software

>

>

Tracy: Unfortunately there is no Database property for a table! You

can only tell if it belongs to a table.

Thanks,

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

_______________________________________________

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/4F1EE3A8.9010308@san-dc.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.

©2012 Jeff Johnson
Back to top
RE: Two DBC's with the same file name

Author: Wally Noll

Posted: 2012-01-24 12:10:55   Link

What I meant is that CURSORGETPROP has that DataBase property, you can test

each dbf and find what DBC it belongs to. I think I had the same exact

problem once.

Wally Noll

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf

Of Wally Noll

Sent: Tuesday, January 24, 2012 10:00 AM

To: 'ProFox Email List'

Subject: RE: Two DBC's with the same file name

Jeff,

I'm pretty sure that CURSORGETPROP function can give you that answer. I

know I've done it, but not handy with code now as I haven't done programming

for years. But I'm sure it'll do it.

Wally Noll

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf

Of Jeff Johnson

Sent: Tuesday, January 24, 2012 9:41 AM

To: profox@leafe.com

Subject: Two DBC's with the same file name

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.

--

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

[excessive quoting removed by server]

_______________________________________________

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/3C7F0BA9215C423385A684A1BB6EAD0C@user834aaa3cd0

** 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.

©2012 Wally Noll
Back to top
Re: Two DBC's with the same file name

Author: Jeff Johnson

Posted: 2012-01-24 12:16:37   Link

On 01/24/2012 10:10 AM, Wally Noll wrote:

> What I meant is that CURSORGETPROP has that DataBase property, you can test

> each dbf and find what DBC it belongs to. I think I had the same exact

> problem once.

>

> Wally Noll

>

> -----Original Message-----

> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf

> Of Wally Noll

> Sent: Tuesday, January 24, 2012 10:00 AM

> To: 'ProFox Email List'

> Subject: RE: Two DBC's with the same file name

>

> Jeff,

>

> I'm pretty sure that CURSORGETPROP function can give you that answer. I

> know I've done it, but not handy with code now as I haven't done programming

> for years. But I'm sure it'll do it.

>

> Wally Noll

>

> -----Original Message-----

> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf

> Of Jeff Johnson

> Sent: Tuesday, January 24, 2012 9:41 AM

> To: profox@leafe.com

> Subject: Two DBC's with the same file name

>

>

> 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.

>

>

>

That's the ticket Wally! Thanks.

How have you been? Long time no hear.

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

_______________________________________________

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/4F1EE775.3050400@san-dc.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.

©2012 Jeff Johnson
Back to top
Re: Two DBC's with the same file name

Author: Jeff Johnson

Posted: 2012-01-24 12:31:05   Link

I use the VMP framework mostly authored by Drew Speedie. Look what I

found in the documentation:

"Since VFP allows you to have more than one .DBC/database open at once,

and each database could have its own GeneratePK table, the fact that

used("GeneratePK") isn't good enough -- we have to make sure that any

open GeneratePK

belongs to tcGenPKDatabaseName"

the database name is passed as a parameter and he used cursorgetprop on

the table

to make sure it is the correct database. Thanks again Drew!

I only had problems when I checked the table outside of a framework

call. Now I know

how to handle it.

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

Jeff

---------------

Jeff Johnson

jeff@san-dc.com

(623) 582-0323

www.san-dc.com

On 01/24/2012 09: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.

>

>

>

_______________________________________________

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/4F1EEAD9.6080006@san-dc.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.

©2012 Jeff Johnson