Get a Jumpstart with our Sample Apps
Page 1 of 3 123 LastLast
Results 1 to 30 of 64

Thread: Losing records VERY WORRYING

  1. #1
    Member
    Real Name
    John Keogh
    Join Date
    Jun 2000
    Location
    Greenock, Scotland
    Posts
    374

    Default Losing records VERY WORRYING

    Hello all

    Searched the board but can't find much on this.

    What's the chances of alpha saving a record and then losing it

    Recently 3 records that my staff assure me were saved have disappeared.

    At first I put it down to human error, now I'm having doubts.

    All records are saved when a receipt gets printed to give to a customer.

    All forms have the delete function disabled.

    When I performed an undelete records, there were no records undeleted

    Any input welcome

    Regards

    John

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Losing records VERY WORRYING

    Hi John,

    Get your staff to show you exactly what they did. Could there be a fiddle going on?

    Check the tables in a default browse to see if the data is really there. Also, check if it is a child table the link has become corrupted.

    And there is always database compact!!
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Losing records VERY WORRYING

    John, I agree with Keith. You should carefully study your table to see if the missing records have been saved with an incorrect link field value. Explore the table. Don't use your data entry form.

    Do the missing records involve memo field text?

    Have you considered implementing an audit trail system to automatically and silently track changes to your table?

    -- tom

  4. #4
    Member
    Real Name
    John Keogh
    Join Date
    Jun 2000
    Location
    Greenock, Scotland
    Posts
    374

    Default Re: Losing records VERY WORRYING

    Thanks for the responses

    I'll do as you both suggest.

    I don't think its a fiddle because the staff brought it to my attention.

    At first I was convinced that they were not doing things properly (being lazy), they assure me they are going through the proper methods.

    I thought that if alpha saved it it should always be there.

    Tom, no memo fields, I know they can be troublesome so I avoid them.

    John

  5. #5
    Member
    Real Name
    John Keogh
    Join Date
    Jun 2000
    Location
    Greenock, Scotland
    Posts
    374

    Default Re: Losing records VERY WORRYING

    Tom and Keith

    Quick update. Can't find the records in the default browse, however, every record has an auto incremented number and the difference between the last record and a new record is 7 not 1 as I would have expected.

    This makes me wonder are there more records missing?

    Your opinions would be valued.

    John

  6. #6
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    5,830

    Default Re: Losing records VERY WORRYING

    I haven't had alpha lose a record in years and am sure it was my fault then.

    a quick record check back up through the records should tell you if it has been happening in the past with the default browse.

    If the ai is skipping 7 numbers, it means the records were entered and deleted somehow, then packed. My opinion. The Packed part is a sign of fiddling if it really happened.

    My main form has a delete button on it that just hides the record. Anyone deleteing the record, just hides it from themselves. If they later pack the table, nothing gets gone. Just a thought.

    Tom had a great idea to log the moves an employee makes in a record on a save. I have a secured log file and my main tables are also secure by encrytption so another program cannot see what they are and possibly change them.

    Onsave form event:
    Code:
    tbl=table.open("logs",FILE_RW_SHARED)
    tbl.enter_begin()
    tbl.date = date()
    tbl.acct = var->theacct
    tbl.Timing = time("0h:0m:sA")
    tbl.user = var->scode
    tbl.action = "Saved Record "
    tbl.enter_end(.t.)
    table.close()
    Note: If I were fiddling and expected a possible catch could be coming, I would report an error of some kind to cover myself. I sincerely hope this is not the case.

    also, not sure if opening the table with something like access then deleting a record, it would just mark it or totally delete it. Encryption would stop that though.
    Last edited by DaveM; 07-22-2010 at 12:36 PM.
    Dave Mason
    dave@aldaweb.com

    Skype is dave.mason46

  7. #7
    Member
    Real Name
    robert muzik
    Join Date
    Nov 2007
    Posts
    400

    Default Re: Losing records VERY WORRYING

    I had a problem like this once and it depended on how the browse was indexed. Indexed one way, some records wouldn't show up. Indexed another, they were all there. Unlike V9, a default browse in V8 can be indexed and stay that way. Just another possible thing to look at.

  8. #8
    Member mariusm's Avatar
    Real Name
    Marius M.
    Join Date
    Sep 2006
    Location
    Plymouth, UK
    Posts
    198

    Default Re: Losing records VERY WORRYING

    I know this is an old thread, but I have this problem in one of my databases too (using version 10.5).
    The users can't show me what they did because this only happens once every few months, apparently at random.
    One record in the main table disappears, but all the child records are still there. I have daily backups so we never really lost a record, but it is worrying.
    When I try undelete, they are not there, but the table has an empty record at the index where the original record should have been - even the auto-incremented ID disappears.
    Delete is disabled in all my forms and browses.
    Last edited by mariusm; 08-29-2013 at 08:09 AM. Reason: to add more info
    It is easier to get older than wiser

  9. #9
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Losing records VERY WORRYING

    Marius, perhaps its time to implement an audit trail to capture and store information about all transactions including the unexplained blanking of an existing record. If you are using the available security module you can even record the user's name in the audit trail table. If this is too ambitious for you, consider adding hidden fields that record the user's name and date for any saved changes to a record.

    By the way, your description suggests that the main table record was not "deleted", just "emptied". If this is being done by disgruntled staff you could block "saves" if certain key fields are blank. Disabling "deletes" does not prevent a person from overwriting field values with blank spaces. Obviously, you'd want to protect the user name and date_changed fields if you choose to add them to your table structure.

    Other possibilities would revolve around batch update, batch post, or table restore operations. When this next occurs you might want to review any recent batch changes that have occurred preceding the discovery.

    -- tom

  10. #10
    Member mariusm's Avatar
    Real Name
    Marius M.
    Join Date
    Sep 2006
    Location
    Plymouth, UK
    Posts
    198

    Default Re: Losing records VERY WORRYING

    An audit trail is a bit of work but I think I'll have to do it. This is a customer with not much money (a charity), so I'm trying to do everything on the cheap.
    My question is how a user can empty the auto-increment field - it's not editable. Although, that only happened once or twice, usually all other fields are empty except the AI.
    I think blocking 'saves' if some fields are blank might be the quickest patch-up for now, and then I'll look at an audit trail. Thanks.
    It is easier to get older than wiser

  11. #11
    Banned
    Join Date
    Jul 2013
    Posts
    123

    Default Re: Losing records VERY WORRYING

    you may also check any sets where the set is based on what would be a child record in the "main" set.

    In other words, user enters a record from a side form(not the main form) that is based on a different set, then goes back and deletes the child record he put in and the set is built so it deletes the parent which at that point is the child. That would be a form built on a reverse set.

    There would be no deletion of other child records just the one affected and the child which should be a parent.

    Make sense?

  12. #12
    Member
    Real Name
    Dennis Mathias
    Join Date
    Aug 2000
    Posts
    231

    Default Re: Losing records VERY WORRYING

    I hate to mention this because I'm such a fan of A5. But yes, it happens. I think it might be a network issue. Something is not being committed or saved properly. Poof--no record. I can't give you much more advice other than watch it very carefully. And backup like there's no tomorrow.

  13. #13
    Member mariusm's Avatar
    Real Name
    Marius M.
    Join Date
    Sep 2006
    Location
    Plymouth, UK
    Posts
    198

    Default Re: Losing records VERY WORRYING

    Yes, Dennis, that's what I think too. This customer has a mix of older Windows XP computers, and newer ones, and the network is wired through the walls - it's been done many years ago. I suspect some of the wiring may be getting old, or maybe some old NIC is playing up, or something like that.
    Because the last record we lost was, again, emptied - including the autoincrement ID which users simply can't delete or change. I have delete disabled throughout the database, only me and an administrator can delete records, and there is only one administrator - the business manager. But even he could not empty an autoincrement field and leave a blank record - you need to change the field rules for that. The control panel is hidden, so I can't see how a user could possibly do this. There is no referential integrity in sets, so when a record is lost, at least I still have all the child records.

    I wonder if switching to mySQL tables would sort this problem, since it uses a different mechanism for comitting / saving / editing.
    It is easier to get older than wiser

  14. #14
    Member
    Real Name
    Dennis Mathias
    Join Date
    Aug 2000
    Posts
    231

    Default Re: Losing records VERY WORRYING

    I'm using the native DBF structure and not SQL. But still you would think that the app would be robust enough to detect a network error if that's what causing. You be damn sure if you find anything that you let me know. :-)

  15. #15
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,784

    Default Re: Losing records VERY WORRYING

    This just a long shot but other programs such as excel can open dbf. In that case the field rules don't apply and the auto increment can be erased. Any chance some other program is interacting with your data?
    Tim Kiebert
    Geelong Citrus Packers
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  16. #16
    Member mariusm's Avatar
    Real Name
    Marius M.
    Join Date
    Sep 2006
    Location
    Plymouth, UK
    Posts
    198

    Default Re: Losing records VERY WORRYING

    They only use OpenOffice, and if you open an Alpha DBF file in OO, modify it and save it back, it corrupts some fields across the whole table, so it's obvious it's been tampered with. I thought about it too, so I tried :-) I don't know if Microsoft Office has the same problem, but they don't have Ms Office installed on any computer, and users can't install their own programs.

    I haven't tried to see if you can do this with some of the online office suites - I guess I better try.
    It is easier to get older than wiser

  17. #17
    Banned
    Join Date
    Jul 2013
    Posts
    123

    Default Re: Losing records VERY WORRYING

    I might suggest table encryption for tables that may be having a problem? If someone can open the tables, they would not be able to figureout which record to affect. They would not be able to read them either.

    I understand they cannot install an app, but do the cd's and usb's still work on these computers?

  18. #18
    Member
    Real Name
    Dennis Mathias
    Join Date
    Aug 2000
    Posts
    231

    Default Re: Losing records VERY WORRYING

    Quote Originally Posted by amorris View Post
    I might suggest table encryption for tables that may be having a problem? If someone can open the tables, they would not be able to figureout which record to affect. They would not be able to read them either.

    I understand they cannot install an app, but do the cd's and usb's still work on these computers?
    It's not that someone is deleting the records. It's that they are disappearing on their own. Some malfunction in either the network or the app. That's the scary part. Not a social problem.

  19. #19
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Losing records VERY WORRYING

    Dennis
    Please clarify. when you say disappear do you mean deleted? Or do you mean that the record continues to exist But fields have been blanked out?

  20. #20
    Banned
    Join Date
    Jul 2013
    Posts
    123

    Default Re: Losing records VERY WORRYING

    One other question? You are running shadowed tables, right????

    On an older network a non shadowed app just might be beyond the threshold of it's ability.

    Alpha would show a network problem in most cases, but if it does not see an error, it cannot.

  21. #21
    Member
    Real Name
    Dennis Mathias
    Join Date
    Aug 2000
    Posts
    231

    Default Re: Losing records VERY WORRYING

    No shadowed tables here..that I'm aware of anyway. I don't have full control of the network but if that's an issue I'll have to look into doing something about it.

  22. #22
    Banned
    Join Date
    Jul 2013
    Posts
    123

    Default Re: Losing records VERY WORRYING

    I think someone said(I have not verified) that a nonshadowed app would nee 1 gig of memory per user at a time and that is if there is no other traffic on the server. Shadowed takes much of the load off the server. It still has data and index to contend with, but all forms, reports, etc and the associated calculations can be done on the work station.

    An old way to check a card(because we had nothing else then) create a very large zip file of over 200 megabytes. copy it to and from the server from a workstation and repeat for each workstation while you time it. Then try it between workstations. There are other tools today, but if you don't have them???

  23. #23
    Member
    Real Name
    John Tary
    Join Date
    Jan 2007
    Posts
    418

    Default Re: Losing records VERY WORRYING

    This has been hapening to me too, random record overwrites. The linking field is blanked. I do not use referential integrity and the only thing the users can do is the scripts I have attached to buttons or events, there are no toolbars at all.

    I have tried to narrow down at what point in the process this happens. I have a 6 user system. The main form is very complex and has 3 browses and about 10 tables in a set displaying information. It always happens when saving the record (which is triggered by an on change event).

    In the onarrive event i record the field value then in the onchange event I look at the value again save the record and write to an audit trail if the values are different. I also check a PIN number for the user entering the data to capture that info.

    I am using dbf files using a NAS as the storage unit. I have some units shadowed and others not, just to see if there is a diference. There are several hundred changes a day and I seem to "lose" a record every third day or so. There is no way directly for them to erase the linking field as it does not even appear on the form.

    I cannot pin it down and have spent an inordinate time trying to. It is very bothersome to tell folks to trust the system and it deletes their records. The only good thing is it happens right in front of them and they can start a new record, but I have very little trust from my group.

  24. #24
    Member
    Real Name
    Dennis Mathias
    Join Date
    Aug 2000
    Posts
    231

    Default Re: Losing records VERY WORRYING

    You're lucky. In my case they even print out a report with the record which often disappears and they don't even know it. Until you go back to change something and the record isn't there--or someone else has used the record! Or there are two with the same number!

    Pretty crazy and I haven't figured it out either.

  25. #25
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Losing records VERY WORRYING

    John,

    I have limited experience with clients using NAS devices instead of PC's or Servers. But my experiences have been bad. In all cases the clients have gone back to full PC or server to handle the data.

    My personal practice is to use complex sets for reports, or readonly forms, never for data entry. A ten table set qualifies as complex.

    One other possibility, you may be mixing form based code with table based code. This, in my experience, is problematic and should be avoided.

    Have you investigated potential issues with "opportunistic" locking settings on the work stations?

    Are your work stations running operating systems that didn't exist when A5v8 was released?

  26. #26
    Member mariusm's Avatar
    Real Name
    Marius M.
    Join Date
    Sep 2006
    Location
    Plymouth, UK
    Posts
    198

    Default Re: Losing records VERY WORRYING

    Sorry, I haven't been here a while, so I just saw the replies now.
    Yes, all my users have the database shadowed. I have narrowed it down to just the same as John says - the record disappears on save.
    It is not deleted, but all data is blanked - I am left with a record that has no data. No, it's definitely not a user deleting data - it is something that Alpha does by itself.
    There is a Customer ID that is auto-incremented, and a couple of other calculated fields - a user has no way of deleting them. They get emptied just like everything else.
    I don't use referential integrity, so all the child tables a left intact - it is only the record in the main table that gets 'emptied'.
    I know that it happens at 'save', because it happened twice, a few days intervals, to two different users. I told them to click 'save' before they start editing a record, just to make sure the data is safe. That was a mistake - they both report that all data simply vanished on clicking 'save'. The 'save' button doesn't do anything else - it's the standard 'save record' action script, that has just one line of code :topparent.commit()
    I use the standard Alpha dbf files. The form this happens in, is built on a set with one main table and two child tables - one to hold memo fields, and one to hold contact info for customers - a one to many link.
    There is a small browse embedded, otherwise is just a standard Alpha form, nothing special except it's the most used form in the application.
    normally I only loose a record every few months, but it is worrying to the point that I'm wondering if I have to switch to mySQL tables or find an alternative to Alpha altogether. This is not the only customer that reports the problem, but it is the one where it happens most frequently.
    One thing that is different with this customer is that all user profiles are stored on the server, not on the local computers. The shadow, however, is on the local hard disk.

    EDITED to say that this customer is using version 10.5 of Alpha, the other customer where this happens to a significant degree uses version 8. They both use a mix of Windows XP and Windows 7, with a Windows Server 2008 as server OS.
    Last edited by mariusm; 12-12-2013 at 06:55 PM.
    It is easier to get older than wiser

  27. #27
    Member
    Real Name
    John Tary
    Join Date
    Jan 2007
    Posts
    418

    Default Re: Losing records VERY WORRYING

    Tom,

    Thanks for the potential info. I am trying right now to have an edit button by some of the fields i made read only so I can see if it happens when they edit in a new form with only one table. Time will tell. I am probably mixing code and I have to look at that. I have read a bit about the opportunisitic locking but I thought it had to do with the servers and not the work station. Presently I am using v11 on everything.
    It is so very strange but I will keep tinkering.

  28. #28
    Member
    Real Name
    John Tary
    Join Date
    Jan 2007
    Posts
    418

    Default Re: Losing records VERY WORRYING

    Tom,

    I added this to my autoexec some time ago, which I believe should turn this off on the client side:
    if registry.sys_get("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\OplocksDisabled")<>"1"
    registry.sys_create("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters\OplocksDisabled","1")
    end if

    This was done a year ago, and still the vanishing problem exists.

  29. #29
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,298

    Default Re: Losing records VERY WORRYING

    John, in any of my data entry forms that include autoinc fields I always begin the new record with a button push that runs a script which begins the new record and then immediately saves the record. This has the salutary effect of locking down the autoinc field value. The user then proceeds to finish the new record in CHANGE mode, not ENTER mode, if you see what I mean. In doing this I've made the design choice that I'd rather write code to delete a partially filled record if the user cancels the "new" record, than to rely on the form to change the autoinc field value after the record has begun, as will happen if someone else on the network saves their new record first. Others may choose differently of course.

  30. #30
    Member
    Real Name
    John Tary
    Join Date
    Jan 2007
    Posts
    418

    Default Re: Losing records VERY WORRYING

    Thanks for the reply. I do the same thing and save the record prior to data entry and continue in change mode. My records that are having the linking field blanked out are the children. This is happening after an edit and selecting save via script and the on change event. The parent has the auto incr field and the child is created and saved with the same number. After editing, the numerical field is blanked that is all, which makes it appear to the user as though it's gone.

Similar Threads

  1. losing records on network
    By martinwcole in forum Alpha Five Version 5
    Replies: 0
    Last Post: 01-05-2007, 04:55 AM
  2. LOSING RECORDS
    By Russ Goeckner in forum Alpha Five Version 4
    Replies: 4
    Last Post: 07-03-2003, 02:11 PM
  3. Losing records
    By Beltronics in forum Alpha Five Version 4
    Replies: 14
    Last Post: 07-01-2002, 07:14 AM
  4. Losing records in a browse
    By Jay Talbott in forum Alpha Five Version 4
    Replies: 14
    Last Post: 09-02-2001, 10:25 AM
  5. trouble losing records
    By Trevor Johnson in forum Alpha Five Version 4
    Replies: 3
    Last Post: 04-18-2000, 04:06 PM

Posting Permissions

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