Search results

  1. D.Cook

    Passing blank numbered parameters to an include file

    It seems I never got the email notification for these responses back in 2009, what a shame. This works, amazingly! This doesn't work, results in "|param2||". It's a shame, because it would be really nice syntax to use. Playing around with &<number>= gives interesting (weird) results.. but none...
  2. D.Cook

    FOR EACH query resolution

    Ah ha, so that explains why user defined functions are not evaluated on each iteration (even when it refers to a database field) ie: for each table where myFunction(table.seq) eq v-i no-lock: display table.seq. end. (myFunction is only evaluated once at the start of the query)
  3. D.Cook

    Reading text files - why is this still not solved ?

    Thanks for the useful info Stefan, we get tripped up by this "known" (often forgotten) issue every now and then.
  4. D.Cook

    Limit transaction to N records

    Tom I'm guessing you're referring to performance; which is interesting to know because I would have assumed it would make a difference. But for Pinne's situation where he wants to stop the process without rolling everything back, I think grouping it would still help. Also it would help in...
  5. D.Cook

    Limit transaction to N records

    Yep, you can do this with an outer loop and a logical flag. For example (I've just mocked this up and don't know if it'll compile but hopefully this gives the idea) DEF VAR min-id AS INT NO-UNDO. DEF VAR max-id AS INT NO-UNDO. DEF VAR num-records AS INT INITIAL 0 NO-UNDO. DEF VAR trans-active...
  6. D.Cook

    Disable database CRC check?

    Regarding client schema change procedures, yes I agree that a defined procedure and discipline are important regardless of your company size. And this is one area that takes a significant amount of time to define and/or script. I'm all for defining procedures and sticking to them, but often...
  7. D.Cook

    Disable database CRC check?

    Thanks for the feedback. Yep I guess dynamic queries are the only answer, but unfortunately we lose the great features of simple static program code. Not to mention a lot of legacy code that can't be changed overnight. I guess we probably have a lot of improvement we could do in terms of our...
  8. D.Cook

    Disable database CRC check?

    We've all done it: compiled a program with the local db then sent it to a client site only to receive an error because their database structure is somehow different. ** CRC for <tablename> does not match CRC in <r-code file>. Try recompiling. (1896) I don't know about every other database...
  9. D.Cook

    INPUT FROM OS-DIR only works once?

    Oh I see, I'd better check the original code I copy and pasted from then. Thanks.
  10. D.Cook

    INPUT FROM OS-DIR only works once?

    Oh.. thanks that works although I have no idea why! Don't know why I didn't try that..
  11. D.Cook

    INPUT FROM OS-DIR only works once?

    It appears that INPUT FROM OS-DIR will only retrieve a directory's contents once in a procedure. I want to do it more! This code is called in an internal procedure (from a button click), but after the first time it is called, doesn't import anything. If the super procedure (window) is closed...
  12. D.Cook

    AVM Memory leak problem

    Good point. So if I was to create an unnamed widget-pool at the start of every non-persistent procedure, I should be pretty safe? I wouldn't think there'd be much added overhead. Although that could be a problem if the objects need to be returned to the calling procedure (not in my case.. I think).
  13. D.Cook

    run procedure extern

    To avoid confusion it would be a good idea to use different named streams for each output destination. Eg: define stream log_strm. define stream error_strm. output stream log_strm to value(file1). {processing} output stream log_strm close. etc..
  14. D.Cook

    AVM Memory leak problem

    I've never quite gotten around to checking out widget-pools and exactly what they do, thanks for explaining RHD. This makes a lot of sense, I'll be creating an unnamed widget-pool for each relevant procedure now, just in case any future code contains a leak..
  15. D.Cook

    Get acceptable Max Screen Width on Dualview

    Build virtual screen rectangle An old thread but helpful, thanks. Something to consider is that the primary monitor may not always be the top-left-most monitor. Using a couple more API calls you can build a 'virtual screen' -- image the smallest rectangle that you can draw to fit all of the...
  16. D.Cook

    run procedure extern

    Hard to say. Are you able to pinpoint the exact point where the program freezes? Perhaps add a few message statements and see where it stops.
  17. D.Cook

    AVM Memory leak problem

    Re: AVM Memory leak problem (Properly deleting dynamic queries and dynamic buffers) The cause of my leak was due to dynamic buffers attached to a dynamic query becoming orphaned and not deleted. Admittedly this is a very uncommon case: normally static buffers would be used, or the session life...
  18. D.Cook

    AVM Memory leak problem

    Also I found this rather extensive article about memory management on the Knowledge Base: http://knowledgebase.progress.com/articles/Article/P98993 I keep forgetting to search it properly, seems to be pretty good info on there these days.
  19. D.Cook

    AVM Memory leak problem

    Great responses, thanks guys. Good idea, I've written a method to check for any orphaned objects, will post soon (EDIT: already done here apparently http://knowledgebase.progress.com/articles/Article/P124514) And I discovered my memory leak seems to be due to dynamic buffer objects not being...
  20. D.Cook

    Appearing as "Not Responding" more often in Windows 7

    Glad to have helped! My Progress case has been closed with no further result, so I guess the best solution is the one I have described above. Some relevant Knowledge Base articles: http://knowledgebase.progress.com/articles/Article/P186859...
Top