Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OOP Design Question
Message
 
À
22/03/2006 12:16:10
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01106264
Message ID:
01106717
Vues:
27
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform