Thanks Tracy, I shall look into it.

However, I will implement the following change:

** to be done in the calling form

 * Create a collection object and stick it to the _screen object
 * Place the fields definitions of the cursor in the tag property of
   the collection object
 * scan through the cursor and place all records in the elements of the
   collection object

** to be done in the init event of the called form

 * use the data in the tag property of the collection object from the
   _screen object and create an empty cursor
 * read the elements of the collection object stuck on the _screen
   object and fill the empty cursor


Because this is a bit involved, I created a class that does just that. This I had to do back in 2009 when I encountered a similar problem.

Since I will not be using the xmladapter class, but simply a collection object stuck in the _screen object, which is available to all forms of the app, even is they have a private data session, I can pass cursors from one form to another without so much hassle.

I seem to recall that the problem I encountered back in 2009 had to do with the wrong MDAC version in the machine that would not accept the xmladapter function. I do not know how to solve this, or what is the right version of the MDAC to use in a f....g Windows 7 Home Basic machine. But with the collection approach, I think I can solve the issue.

If any of you guys is interested, this is what I do:

calling form method

Set Procedure to makecollections.prg additive && this is my collection making class
        thisform.oColec = CreateObject('colecciones','oApagar','curApagar')

** call the payment slip form and pass several special parameters to it

Do form frmOrdenPago with thisform.oForm ,nAnticipo,.nCodigo,cTipo,nValorAnticipo

in the called form init event

Set Procedure to makecollections.prg additive

Use in Select('curApagar')
thisform.oColec = CreateObject('colecciones')
thisform.oColec.fillcursor('oAPagar')

The calling form has a cursor with all upaid invoices from a vendor. I pass this cursor to a form that enables the user to select which invoices to pay and prepare a payment slip.

The makecollections class receives the name of the collection object and the name of the cursor with the unpaid invoices in its init event. The called form uses the class fillcursor method to recreate the cursor curApagar

The class is too big to post here. I can make it available to whoever is interested.

Rafael Copquin



El 05/03/2015 a las 14:02, Tracy Pearson escibió:
Stephen Russell wrote on 2015-03-05:
  Put a try catch in there to verify what the error is.
On Wed, Mar 4, 2015 at 5:06 PM, Rafael Copquin <[email protected]>
  wrote:
The error occurs when I am trying to pull the cursor from the xml received
from the calling form, at the init event of the called form, with this code


Local oXML

oXML=CreateObject('XmlAdapter')
oXML.LoadXML(tcXML)

oXML.Tables.Item(1).ToCursor()    && pulling curApagar cursor

Rafael


Rafael,

According to your first post, this is the error:

Error number:       2110

Error message: XML analysis error: the value,type or number of arguments
is not valid for the function.
   "original" XML node = <original>-1.005,00</original>

It looks like it is attempting to convert the "original" to a numeric. 
Depending on the encoding at the beginning of the xml, this is the wrong format.

Look at the resulting XML that is passed. It should have an inline schema. It 
may have the following:

                <xsd:element name="original">
                        <xsd:simpleType>
                                <xsd:restriction base="xsd:decimal">
                                        <xsd:totalDigits value="11"/>
                                        <xsd:fractionDigits value="2"/>
                                </xsd:restriction>
                        </xsd:simpleType>
                </xsd:element>


Tracy Pearson
PowerChurch Software


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to