Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass >255 chars to a VFP COM Object?
Message
De
13/08/2001 11:22:32
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
 
 
À
12/08/2001 22:47:41
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00542853
Message ID:
00543049
Vues:
18
>Greetings all -
>
>I've been out of the VFP world for a while as most of my projects lately have been ColdFusion and SQL Server, so maybe I'm missing something obvious...
>
>I created a simple VFP7 COM object that takes a character string as a parameter and parses it into various parts. Works fine for short strings, but it crashes with "String too long to fit" when passed more than 255 characters.
>
>I'm obviously hitting the internal 255 limit for character data types, but I would have thought that with all the wiz-bang COM improvements to VFP7 that MSFT would have given us some more flexibility here...maybe it's here and I'm just missing it?
>
>TIA,
>
>Jay

i encountered the same wall. here is a way to deal with it.

define a "Parameter Carrier" class that has property names that represent
parameters that you would pass to your COM server. before invoking a
server function, instantiate the "Parameter Carrier" and assign to the
properties, the values you would have passed directly as parameters.
then call the server function, passing the "Parameter Carrier" object
as a parameter. you will need to change your PARAMETER statement and
extract each property in your server function.

IOW ... instead of passing the bare naked string to your COM server, "hide"
the string inside an object and pass the object as a parameter.
patrick
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform