VFP Test code: PROCEDURE UpdateTemplate(lcXMLDataSet as String) as String LOCAL loXMLAdapter AS XMLAdapter loXMLAdapter = CREATEOBJECT("XMLAdapter") loXMLAdapter.LoadXML(lcXMLDataSet) loXMLAdapter.Tables(1).ToCursor(.f.,"header") loXMLAdapter.Tables(2).ToCursor(.f.,"detail") loXMLAdapter.Tables(3).ToCursor(.f.,"smartcode") USE (datapath + "gphmast.dbf") SHARED IN 0 USE (datapath + "gphdtail.dbf") SHARED IN 0 USE (datapath + "gphesc.dbf") SHARED IN 0 SELECT header m.tempno = tempno &&Get PK value to search for SELECT gphmast SET ORDER TO tempno IF SEEK(m.tempno) && --- Seek Fails! rtnval = "Record Found!" ELSE rtnval = "Template " + str(m.tempno) + " Not found. ENDIF RETURN rtnval ENDPROCIf I change the seek to: “SEEK (m.tempno+0)” it finds the matching record.
<xs:element name="tempno"> <xs:simpleType> <xs:restriction base="xs:decimal" /> </xs:simpleType> </xs:element> Data: <tempno>29131</tempno>When I run similar code from the command window (pulling the xml from a file) it finds the record.