Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with _VFP.datatoclip
Message
De
30/03/2009 22:09:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problems with _VFP.datatoclip
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01392270
Message ID:
01392270
Vues:
181
I'm having problems with the following code:
lcStruct = Sys(2015)
Select &lcFields From (lcAlias) Into Cursor (lcStruct) readwrite Where Recno()<=lnThruRecno+1

Afields(filestruct, lcStruct)

*** and use {datatoclip} to paste these columns into Excel
loMsg.Progress("Writing Data")
_Cliptext = ''
_vfp.DataToClip(lcStruct, 99999, 3)
The problem I am getting, at times, occurs on the last line. I get the error message
OLE IDispatch exception code 0 from Visual FoxPro for Windows: 13 :Alias is not found...".

The most curious thing about this is that I can resume execution (on the same line) and it works correctly!

Now, one additional piece of information. I have been using this code for years. It's used every day. However, what has changed is that this program is, for the first time ever, called twice in a row (it's exporting a grid to Excel). However, I have a hard time seeing the relevance -- note the call to AFields(), which uses the same cursor name correctly. So why would DataToClip think the cursor does not exist?

More importantly -- anybody have any suggestions of a way around this?

Thanks in advance.
Jim Nelson
Newbury Park, CA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform