Strange Error In Clarion 10


#1

I’ve just recently installed Clarion 10 and am in the process of converting my Clarion 5.5 applications to Clarion 10. A very frustrating procedure. I have the following snippet of code that works correctly the first time it is executed but does not work the next time the window is opened. The code is as follows:

FillQueue ROUTINE
FREE(List3)
Set(NewExtents)
LOOP
  NEXT(NewExtents)
  IF ERRORCODE() THEN BREAK.
  Q3:Extent = NW1:Extent
  IF LEN(CLIP(Q3:Extent)) > 0
    ADD(List3,+Q3:Extent)
  END
END

As you can see, it’s pretty straight forward and worked fine in Clarion 5.5. However in Clarion 10, the first time it reads the NewExtents file and fills the queue correctly. But the next time the window is opened, it reads a totally different file. I’ve stopped the app with the debugger and the filename is correct but the data read is from another file used by the window. I also get no errors like Invalid Record Declaration.

This has me really baffled. Does anyone have any insight into what might be causing this?

Thanks,
Marie


#2

Do you use NewExtents buffer for some manual queries elsewhere? Something like this:

NewExtents{prop:sql} = ‘select columnA, columnB… from tableC’

You will not see the Invalid Record Declaration error if those column’s data type match with first associated columns of tableC.


#3

There’s other stuff going on that you haven’t told us about.

The only change I would make to your code is…

Your code isn’t reading the wrong file.


#4

Thanks for your reply but I’m not do anything like that.


#5

Thanks for your reply but your change made no difference. Like I said in my post, I’ve stopped the app with the debugger and I see different values being read on the Next statement and they are coming from the Partnums file. The first time I see the following:
image
The next and subsequent times I see:
image
which are the same values as the following:
image


#6

What is file driver used?
Any chance that you are changing file name variable somewhere in code

Leonid Chudakov


#7

It is a FoxPro file. When I was debugging, I checked the filename variable and it was the correct file.
Marie


#8

Sounds like a bug in clarion to me. Should be reported.
Many years ago in C6 I had a problem where the driver would very occasionally use the wrong driver string for ODBC tables and pick the wrong DB.


#9

Is List3 a global queue, or local queue?


#10

It is a local queue.


#11

I think I’d delete List3 and the dropdown listbox and recreate both.
It’s possible some FEQs are scrambled in some way.

Graham


#12

That should be working. But the spec for the files and controls would help us.

If all else fails, I would delete the drop list and the queue, and instead place a template control called “File loaded drop box” (in the window designer screen). It should handle the queue and file automatically.


#13

Thanks for all the replies but I think this has something to do with threading. I’m upgrading from Clarion 5.5 where threads were handled completely different. All the files are threaded but many static variables in the Global Data area are not. I don’t see how they would manifest themselves in this way but other issues I was having were cleared up when I did things within the current thread opposed to doing it from Thread #1. I haven’t reworked this screen but will let you know what happens when I do.


#14

Please try to put CLEAR(NW1:Record) before Set(NewExtents).

Also try to use key on SET command like SET(NW1:Pk_NewExtents,NW1:Pk_NewExtents)