General information
Category:
Object Oriented Programming
I do that all the time. You can still acheive it using maybe ADO or XML. So your global object can return XML or a recordset object and your form can call your global object methods and then use XMLToCursor or RsToCursor.
>As I said in another post, it's a global object and re-creating it in each form defeats the whole point of having a data gathering object. I was trying to centralize the code that accesses these tables so if the tables change, I only need to change the code in one place. But it looks like that isn't possible. So much for my attempt at de-coupling the data from the forms. I guess that just doesn't work.
>
>Thanks for all your help.
>
>Michelle
>
>--------------------------------------------------------------------------------------
>
>>Why dont you initiate you object in the load of your form before calling it ?
>
>--------------------------------------------------------------------------------------
>
>>>That won't work since I'm calling the object's method in the load. Otherwise I'd be using the object before instantiating it. :)
>>>
>>>Thanks,
>>>
>>>Michelle
>>>
>>>Sigh... I see HR was taken away. I guess I'll hand draw the lines...
>>>
>>>------------------------------------------------------------------------------------
>>>
>>>>Try to instantiate your object in the form's Init...
>>>
>>>------------------------------------------------------------------------------------
>>>
>>>>>Maybe I'm not being clear...
>>>>>
>>>>>The form is using a private data session. In the load of the form, I call this custom object to gather some data. When the object's code runs, it errors because it can't find the cursor I told it to put the data in (which was created in the form). If I suspend, I can see that I'm in the default data session, and not the form's private data session. I need the object to use the same datasession as the form that is calling it, _not_ the default datasession. How do I do that?
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Michelle
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only