Results 1 to 7 of 7

Thread: Record not found rears its ugly head once again

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Stord, Norway
    Posts
    882

    Default Record not found rears its ugly head once again

    I've encountered a situation which I find quite puzzling. I may need to create a smaller workspace that can reproduce the problem, but since that is probably a lot of work, let me describe the situation first:

    I am testing some order entry scenarios for our application (not the order entry example that's provided with DataFlex Studio, although perhaps the same problem could be shown there). I have everything automated, even simulating the pressing of keys. Before every test run, I am running a script to restore the database (it takes only a second). Then a few order entry scenarios are running. After every scenario, I run a SQL script to delete the orders that have been created. And here is where the problem occurs. Presumably, if I delete the orders using dataflex commands, it would be ok. But when I do it using SQL statements, DataFlex gets confused.

    So after the SQL delete statements, when the next order entry scenario is happening, when the order detail has been entered and the program tries to save, the save fails, with a "record not found" error.

    I have tried to send "clear" messages to help DataFlex understand that there is no active record. But so far I have not been successful.

    Has anyone seen anything like this? Is there a way to tell DataFlex that the database has been "reset", so all DataDictionary objects and global database buffers are regarded as empty?
    Ola Eldøy (Twitter: @olaeld) - Developer at Emma EDB AS

  2. #2
    Join Date
    Jul 2009
    Location
    Wiesbaden, Germany
    Posts
    245

    Default Re: Record not found rears its ugly head once again

    may be a stupid idea, but why not just send a "Broadcast Recursive No_Stop Send Clear of oMain"?
    Should clear each and every one of the dds that are already loaded.

  3. #3
    Join Date
    Feb 2009
    Location
    Stord, Norway
    Posts
    882

    Default Re: Record not found rears its ugly head once again

    Quote Originally Posted by GhostShotIV View Post
    may be a stupid idea, but why not just send a "Broadcast Recursive No_Stop Send Clear of oMain"?
    Should clear each and every one of the dds that are already loaded.
    That wasn't stupid at all! It worked! Thanks
    Ola Eldøy (Twitter: @olaeld) - Developer at Emma EDB AS

  4. #4
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,321

    Default Re: Record not found rears its ugly head once again

    it is obviously still thinking that it has some record in the buffer

    What files are involved? any system files?
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  5. #5
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,321

    Default Re: Record not found rears its ugly head once again

    Quote Originally Posted by starzen View Post
    it is obviously still thinking that it has some record in the buffer

    What files are involved? any system files?
    One thing i would do is to close and reopen all tables

    We do this in systems were we switch databases on the fly

    You need to

    1) Remember all open tables and their file modes
    2) Issue a CLOSE DF_ALL
    3) Reopen all tables and reset their file modes

    You also need to clear the DDs of course
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  6. #6
    Join Date
    Feb 2009
    Location
    Stord, Norway
    Posts
    882

    Default Re: Record not found rears its ugly head once again

    Quote Originally Posted by starzen View Post
    One thing i would do is to close and reopen all tables
    Thanks for the suggestion, Mike! This time a "Broadcast Recursive No_Stop Send Clear" did the trick, though.
    Ola Eldøy (Twitter: @olaeld) - Developer at Emma EDB AS

  7. #7
    Join Date
    Feb 2009
    Location
    Stord, Norway
    Posts
    882

    Default Re: Record not found rears its ugly head once again

    Quote Originally Posted by starzen View Post
    What files are involved? any system files?
    That question represents part of the problem It's a monolithic application where finding out what is really going on is quite a challenge. So running automated regression tests is a tool which helps me figure out these things... Except when the tests won't run and I can't find out why
    Ola Eldøy (Twitter: @olaeld) - Developer at Emma EDB AS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •