Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9205303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:55:15+00:00 2026-06-17T23:55:15+00:00

im using Microsoft XML Core Services (MSXML) to parse and create XML-documents with Paradox

  • 0

im using Microsoft XML Core Services (MSXML) to parse and create XML-documents with Paradox 11.0.0.676.

when i call certain methods of the oleAuto-objects, Paradox crashes when reaching the endMethod statement
(the code is in the pushButton event of a button). That brought me to the conclusion, that the problem could be the “releasing” of oleAuto-variables. so i´ve put the variable-declarations to the form. if i debug the code, the
GPF doesn´t appear at the endMethod of the Button anymore, but still occurs when exiting the program. So i might be right that the problem is where it comes to release variables. Explicit close() orders of the OLE-objects do not solve the problem. Anyone got an idea? I really need that MSXML to work 🙁 Other MSXML-Methods work very well, like searching XML-files via XPath for specific elements etc. .

here comes the code and the xml-files.
the code validates a node of a xml-file against the xml-schema.
(code and xml-files are from the microsoft msxml reference, slightly changed and applied to objectpal of course):

ValidateNode.xml

<?xml version="1.0"?>
<x:books xmlns:x="urn:books">
   <book id="bk001">
      <author>Hightower, Kim</author>
      <title>The First Book</title>
      <genre>Fiction</genre>
      <price>44.95</price>
      <pub_date>2000-10-01</pub_date>
      <review>An amazing story of nothing.</review>
   </book>

   <book id="bk003">
      <author>Nagata, Suanne</author>
      <title>Becoming Somebody</title>
      <genre>Biography</genre>
      <review>A masterpiece of the fine art of gossiping.</review>
   </book>
</x:books>

ValidateNode.xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="urn:books"
            xmlns:bks="urn:books">

  <xsd:element name="books" type="bks:BooksForm"/>

  <xsd:complexType name="BooksForm">
    <xsd:sequence>
      <xsd:element name="book"
                  type="bks:BookForm"
                  minOccurs="0"
                  maxOccurs="unbounded"/>
      </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="BookForm">
    <xsd:sequence>
      <xsd:element name="author"   type="xsd:string"/>
      <xsd:element name="title"    type="xsd:string"/>
      <xsd:element name="genre"    type="xsd:string"/>
      <xsd:element name="price"    type="xsd:float" />
      <xsd:element name="pub_date" type="xsd:date" />
      <xsd:element name="review"   type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id"   type="xsd:string"/>
  </xsd:complexType>
</xsd:schema>

ObjectPal-Code:
Paradox-Form with just a button on it, this is the code from the pushButton Event (quick & dirty code :-)).
The code works like it should: the element is shown in a messagebox which tells details about why the element isn´t valid. If i debug the code, Paradox crashes when reaching the endMethod statement. OS is Windows 7 64 Bit, Paradox is Version 11.0.0.676.

method pushButton(var eventInfo Event)
var
 xd, xs, er, nlist, node        oleAuto
 err                            oleAuto
endVar
 if NOT xd.open("Msxml2.DOMDocument.6.0") then
  msgStop("Error", "Error")
  return
 endIf
 if NOT xs.open("Msxml2.XMLSchemaCache.6.0") then
  msgStop("Error", "Error")
  return
 endIf
 xs.add("urn:books", "C:\\LZE\\MSXML\\validateNode.xsd")
 try
  xd^schemas = xs
  xd^async = false
  xd^validateOnParse = false
  xd^load("C:\\LZE\\MSXML\\validateNode.xml")
  err = xd^validate()

  nList = xd^selectNodes("//book")
  node = nList^item(1)
  msgInfo("", node.xml)
  err = xd^validateNode(node)
  msgInfo("", err.reason)

 onFail
  msgStop("!!!", "!!!")
 endTry
 try
  if xd.isAssigned() then
   xd.close()
  endIf
  if xs.isAssigned() then
   xs.close()
  endIf
  if nList.isAssigned() then
   nList.close()
  endIf
  if err.isAssigned() then
   err.close()
  endIf
         onFail
  msgStop("!!!", "!!!")
 endTry
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:55:16+00:00Added an answer on June 17, 2026 at 11:55 pm

    i just want to give you a short summary of the problem i had and a fix / workaround for it, since it may help with other activex- and general protection faults issues:

    when calling certain methods (my assumption is, that maybe pointers are the problem) of activex-objects, paradox crashes, usually with a general protection fault. in most cases, this happens right before the endmethod-statement is reached. that brought me to the assumption, that the problem might be the “de-referencing” of variables. paradox / windows can´t clear them, or tries to get access to certain spaces of the memory, which is denied by windows. the following code in the pusubutton-event of a button is a good example for that:

    method pushButton(var eventInfo Event)
    var
        oXD, oXMLElement    oleAuto
    endVar
    
        if NOT oXD.open("Msxml2.DOMDocument.6.0") then
            msgStop("Error", "cant create object")
            return
        endIf
    
        oXMLElement = oXD.createElement("someElement")
                    msgInfo("", oXMLElement.xml)
        oXD.appendChild(oXMLElement)
    
    
    endMethod
    

    the first time you push the button, the messagebox is displayed, showing the created xml-element. if you now switch from runmode into editmode, run the form and push the button again, paradox crashes: the oleauto variable oXMLElement was still in memory.
    i spend a lot of time searching for a fix for this problem and i finally got a workaround: before the end of the method, let the oleauto-variable reference another object, the progress-bar e.g.:

    if NOT oXMLElement.open("MSComctlLib.ProgCtrl.2") then
        msgStop("Error", "cant create object")
        return
    endIf
    

    at least this works for me, with paradox 11, tested on win xp and win 7. any comments to this welcome. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have an understanding-problem using Microsoft XML Core Services 6.0 (MSXML) with XPath-expressions. I´ve
Okay, so I'm writing a utility that compares 2 XML documents using Microsoft's XML
I'd like to start using Microsoft Open XML API with Delphi 2009 to create
Using Microsoft SQL Server... declare @x xml set @x = '<Example>&lt;You &amp; Me&gt;</Example>' select
I am using Microsoft's XSLT processor (1.0 only) XML opening lines: <?xml version=1.0 encoding=utf-8?>
I am using Microsoft.Office.Interop.Word.ApplicationClass to read a set of Word documents. I am able
I'm using Microsoft's CSharpCodeProvider to dynamically create and execute code. Right now, it creates
I'm using Microsoft Open XML SDK 2 and I'm having a really hard time
I am using Microsoft XML Excel with ColdFusion to display my query results on
Curious question. I'm using Microsoft's Sandcastle to generate documentation from the XML comments in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.