Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM Object Interaction & passing by reference
Message
 
 
À
06/11/2002 15:06:01
Daniel Williams
Wildahunden Web Works
Austin, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00719522
Message ID:
00719537
Vues:
14
Daniel,
When passing objects around, you don't need the @ sign. See Message#339137 for an explanantion. You should not be using the @ throughout your application, IMO. How does this break things elsewhere?

>I have a com object written in FoxPro 6.0 (SP5). The project has several classes that are OLE Public and are registered in MTS (COM+). The dll works gread under NT 4.0 but is now giving an error under Windows 2000.
>
>The objects are DBAccess.Client, DBAccess.Company and DBAccess.Address. In the ASP page, we create an object of type DBAccess.Client and pass in a recordset to the Save method [ oClient.save(oRS) ].
>
>The save method uses MTS to create DBAccess.Company and DBAccess.Address objects to save the Company and address information prior to saving the client information.
>
>In the code, we call:
>PARAMETERS voRS
>
>oCompany.Save(@voRS)
>voRS.MoveFirst
>
>which crashes. There are two ways to work around this issue. One is to take out the @ operator. The other is to leave the @ operator in, create a new package in MTS and move the dbaccess.client class to that new package and voila, it starts working. I don't understand what is happening, but need to find out because neither solution is very good for our complete application.
>
>
>(VFP 6.0 SP5 Win2000 Server.)
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform