Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String Too Long to Fit
Message
De
13/05/2000 09:22:53
 
 
À
12/05/2000 16:59:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00369164
Message ID:
00369324
Vues:
18
Hi Cetin,

I'm running VFP 6.0 on an NT 4.0 workstation with 128mg.

It appears that I have happened upon an anomaly that others may have encountered also.

In a SQL Select statement that has the parameter 'Into Table TableName', if TableName is not in the path I get a "String too long to fit" message on the entire Select statement of course.

In the app I'm currently have a problem with I setup the following:

lcTempDir = "C:\CVS\"

other code...later after creating a Word Object:

lcDocument=lcTempDir+"BetExp01.doc"
.Documents.open(lcDocument)

If BetExp01.doc is not in the path I get a "String too long to fit" message at the .Documents.open(lcDocument) statement.

I've resolved these problems but now get the message "String too long to fit" at the .application.run("Replace") command in the routine below used to replace text in a Word template.

NewText = MDY(DATE()) && Thanks to Bret
DO WordRepl WITH "<>", NewText

WordRepl Routine follows:

Lparameters OldText, NewText
*
* Replace All OldText with NewText
*

WITH oWORDDOC

.Selection.Find.ClearFormatting
.Selection.Find.Replacement.ClearFormatting

.Selection.Find.Text = OldText
.Selection.Find.Replacement.Text = NewText
.Selection.Find.Wrap = 1
.Selection.Find.Format = .f.
.Selection.Find.MatchCase = .f.
.Selection.Find.MatchWholeWord = .f.
* Word.Selection.Find.MatchWildcards = False
* Word.Selection.Find.MatchSoundsLike = False
* Word.Selection.Find.MatchAllWordForms = False

.application.run("replace")

ENDWITH

I don't know how much memory the RUN command requires. I could be running out of memory on the users workstation although she has 128mg on her Win98 workstation but is running from a NT 4.0 server.

Sys(1016) returns 726624 on my workstation just prior to executing the Run command. I havn't checked her machine.

There may be a more efficient method to accomplish the Word Replace. I use this to "REPLACE" name, address, and other data in the template also. If you know a better way I would appreciate you sharing it with me. TIA.

Regards,

Paige
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform