Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OOP Design Question
Message
 
To
22/03/2006 12:16:10
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01106264
Message ID:
01106717
Views:
29
That was a nice idea. Worked well.

Thanks


>Hi Kevin,
>
>I created a connection class. That way I can pass the connection object to each class that I need it. I also have methods that test the connection and automatically create a new connection if the old one is dropped.
>
>>I'm developing a VFP DLL. There are multiple classes in this DLL.
>>
>>The main class has a Setup method which connects to SQL and stores the connection handle.
>>
>>The main class also has an AddUser method, which creates an instance of the User object and
>>returns it.
>>
>>
>>Problem 1
>>The problem is that since the User object is not inherited, but is instantiated, how do I access
>>the SQL data? The user object will not 'know' what the SQL handle is, so it cannot read/write to SQL.
>>
>>Problem 2
>>Should I maintain a connection to SQL, or connect & disconnect when ever I need to access the
>>database?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform