Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_XMLCalvinh?

Status
Not open for further replies.

rkolva

Programmer
Jan 16, 2003
127
US
I've got a routine that calls a parameterized query and recieves the data as XML data and makes a call to XMLtoCursor(). I have a user that keeps getting the error:

"Invalid subscript reference"

My error handler records the line of code that generated the error as the following:

"create cursor TNetQuery from array _XMLCalvinh"

While I do have a cursor called 'TNetQuery' that specific line of code doesn't exist anywhere in my app. My best guess is its coming from somewhere inside XMLToCursor()?

Anybody out there have an idea of what _XMLCalvinh is?

Thanks,

Ralph Kolva
 

Ralph,

I think you're right that it is sort of internal code, but, if so, it shouldn't show up in your error handler. Are you running any wizard-generated code or foundation classes here?

Does your error handler tell you the name of the routine that caused the error (if it doesn't, perhaps you should add it; use PROGRAM() for that)?.

For what it's worth, _XMLCalvinH sound very much like something to do with Calvin Hsia, who is a member of the VFP development team.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
I'm with Mike on this one, _XMLCalvinh sounds very much like Calvin Hsia put his name on it. LOL, that's too weird.

So, is the XMLtoCursor() line of code the last line that executes prior to this error being returned?

boyd.gif

SweetPotato Software Website
My Blog
 
Thanks for the response Mike and Craig,

The funny thing is that the line number and line of code reported by the error handler don't seem to make any sense. I finally did manage to reproduce the error and now I can see how the 'Invalid Subscript' message seems to make sense but not the "create cursor TNetQuery from array _XMLCalvinh" message. The call to XMLToCursor worked as I had a correctly created cursor from the XML which is called TNetQuery but renamed before the line of code that bombed.

It looks like the problem arose when the cursor got too large to SQL SELECT into an array, thus the subscript reference. I modified the code to iterate through the cursor instead of stepping through an array, I really don't why it was coded as an array in the first place when the data was already in a work area, and things appear to behave for now.

But the mystery as to where "create cursor TNetQuery from array _XMLCalvinh" came from remains as the line of code that caused the problem had nothing to do with XML nor a cursor named 'TnetQuery'

Thanks for your help,

Ralph Kolva
 
Hi Ralph

But the mystery as to where "create cursor TNetQuery from array _XMLCalvinh" came from remains as the line of code that caused the problem had nothing to do with XML nor a cursor named 'TnetQuery'

I suspect that this was debug code that Calvin accidentally left in the code that implements XMLTOCURSOR()




Marcia G. Akins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top