Yes, you are correct about this... It's a fair and constructive question. And in most cases, I do exactly that, since it is the best practice.
However, I am in the process of migrating my app to wwBusiness (about 80% complete), so I still have a few cases where there is a mixture of good BO practices, and a few old-school things going on in my forms.
So, my suggested fix would eliminate the issue for those apps that are not perfectly in the BO camp yet, without causing any problems for the pure BO world.
I'm hoping Rick will comment... Haven't heard from him yet.
Sure, I can change the code on my end, but I try to never alter the wwBusiness code at all.
Ahh. I understand the dilemma now. I guess it would help if I paid better attention to what you said in your inital post!
Wouldn't you want to consistently use the business object for all data access instead of mixing table access in with your user interface anyway? Seems like that would be one solution to this type of situation while having the side effect of compartmentalizing your data access and UI code.
Just another thought (and hopefully a better one than the last!).
Marty
My app runs with Set Exclusive Off
That's not the issue... It has to do with using the table once for one purpose (say a grid on a FoxPro form), and then trying to use it again for another purpose, but under a different alias.
You have use the AGAIN keyword on the USE statement the any time you try to use the table a second time in a data section.
Hey Matt,
I get around this in my desktop apps by setting Exclusive off. WebConnection has this as a requirement so I started adopting that thinking too.
Just a thought,
Marty
Rick - I hit a problem with the Open() method on the wwBusiness class today. I am using the class with FoxPro DBF tables and a desktop app.
The issue I had was that the form I was using had already USED the DBF table under an alias that was different than the DBF filename, and then I created a wwBusiness object, and when its Open() method was called, it tried to USE the table also, but failed, because the table was already being used, but under a different alias.
To me it seems like the Open() method should use the AGAIN keyword to prevent this error from happening.
Like this:
Here is the code from your class: