Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Large memo updates are losing data in COM object
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01161913
Message ID:
01162327
Views:
17
What happens if you try it with 8100 characters?

The maximum value for memowidth is 8192 in some legacy VFP memo-field processing operations. For example, MLINE will return a maximum of 8192 characters no matter how long the line actually is. Easy to see how this can cause a problem, for example, with a large HTML blob having all carriage returns stripped out and yet the HTML still works just fine in a browser. You cannot rely on MLINE to reliably chunk something like that.

>Thanks for the reply, but what was the old 8192 memowidth problem? I am using a VFP 9 database and VFP 9 to compile the ComCodeBook DLLs.
>
>The data does not look like a problem as for a test I generated a remark with 8,200 'X' and the Com call failed also.
>
>Since ComCodeBook allows us to point from one backend to another. I checked this same procedure out in a ComCodeBook DLL that points to SQl Server as the backend and the data gets updated with no problem.
>
>So the problem is with ComCodeBook and VFP data.
>
>
>>You might consider looking into these:
>>
>>1) Could the old 8192 MemoWidth limit be causing a problem that was not anticipated when CCB was being developed?
>>
>>2) Could there be some extranneous characters in the data that don't cause problems when the remark is sent outbound for review but do cause problems when being processed as inbound data?
>>
>>
>>>I am using ComCodeBook to run several web applications. The web applications have been running with no problem for quite some time. But this week I had an engineer who contacted me about losing his remarks for a record he had in the database. The engineer's remarks are being stored in a memo field and the size of the memo field is about 13,000 characters. The data was entered into the memo field from another source outside the COM object. He can bring up the record via the web (using the COM object) and view the data no problem. But when he tries to update the remark data the ComObject loses the whole memo field. I have tried the sequence manually using VFP command window and I get the same results. ComCodeBook does not throw an error, but the memo field data is either gone or a few characters are saved. This is the code I ran via the command window:
>>>
>>>
>>>lcPrcProcRem = FILETOSTR('C:\temp\bret.txt')
>>>
>>>loComObject = CreateObject("MwsResourceMgr.PssProcurements")
>>>loRS = loComObject.GetPssProcurementsByPrcKey(3555)
>>>loFields = loRS.Fields
>>>loFields.Item("PrcProcRem").value = lcPrcProcRem
>>>cXML = "<TABLE><ROW><CRMPNAME>oPssProcurements</CRMPNAME>
>>><CRMCLSNAME>MwsResourceMgr.PssProcurements</CRMCLSNAME>
>>><NSAVEORDER>0.00</NSAVEORDER>"
>>>cXML = cXML + "<CPARNTRELA></CPARNTRELA><LPRIMARY>T</LPRIMARY>
>>><CKEYFIELD>PrcKey</CKEYFIELD></ROW></TABLE>"
>>>loRMController = CreateObject("MWSProcessObj.RMController")
>>>lnRtn = loRMController.Set_Up_Environment(cXML)
>>>lnRtn = loRMController.MarshallData(loRS,"oPssProcurements")
>>>lcXMLValidation = ""
>>>lnRtn = loRMController.Save("lcXMLValidation")
>>>
>>>
>>>I know a lot of you are not familiar with ComCodeBook, but if you have any idea of why the memo field would not be saved I would like to hear it or if you have any past experiences in Record Sets and limitations I would like to know that also.
>>>
>>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform