Deleted Recs still appear on HH Device

Discuss the HanDBase for Windows Desktop program, conduits, and add-ons.

Deleted Recs still appear on HH Device

Postby SphereMonk » Wed Sep 29, 2010 9:37 am

Hi all,

We use HanDBase to download Workorders created by our field operators to our Access database in the office. The Workorders are then processed by the office staff and deleted from the Access table that the HH syncs with.

There is a Workorder HBDB and a related HDBD for WOLabor, WOMaterial, WOInventory and WOEquipment. All of these sync with their respective tables in Access. Any workorders that are processed by the office staff have the associated records for those workorders deleted from all of those tables.

The problem we are having is that, after the next sync of the device, the workorder records that are deleted in the Access table do not get deleted in the Workorder HBDB on the HH device, even though in all the other HBDBs (WOLabor, WOMaterial, etc.) the records are deleted. I have to go into the Workorders HBDB and delete them manually. All other syncing seems to work correctly.

The only thing that I can think that is happening is that maybe the sync process is trying to delete the Workorder records before deleting the records in the related databases, and it is not getting deleted because related records still exist in the other HBDBs. Could this be the case and, if so, is there a way to force the order of database syncing?

Thanks,

Dan
SphereMonk
 
Posts: 5
Joined: Wed Sep 29, 2010 9:09 am

Re: Deleted Recs still appear on HH Device

Postby dhaupert » Wed Sep 29, 2010 10:05 am

Hi Dan,

Thanks for your post. I don't believe the conduit knows whether there are any related records as it treats each of those files as separate entities during a sync, unlike the HanDBase clients which actually tie them together. I'm honestly not sure why this would happen. As a test, can you try just syncing the main workorder database by itself and see if the deletes sync then? We can then dig deeper and see why that would possibly happen!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Deleted Recs still appear on HH Device

Postby curtterp » Wed Sep 29, 2010 9:58 pm

Hi Dan,

I have a few questions on your process, if you don't mind answering them. I am trying to understand how you are doing it.

Your Handhelds, are they Windows, Palm, iPhone/iPad and how many do you have?

Are they Windows, Palm, iPhone/iPads or a mixture?

Do your operators sync on one computer, or do they sync to their own computers and the access tables are on one computer (ie network drive?)

Are you seeing these records not being deleted across all handhelds or just some of them?

Are your operators syncing before they go out again (next day after processing) or do they just sync at night and the previous days records are on the handhelds when they are out during the day and get deleted when they sync at night.


I know its a lot of questions, but understanding how your flow is will help in trying to determine what might be happening.

Have a good day.
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 679
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Re: Deleted Recs still appear on HH Device

Postby SphereMonk » Thu Sep 30, 2010 7:10 am

Thanks for your replies.

Let me try to answer your questions before I try the solitary Workorder table sync.......

The handhelds are Iphones. We currently have 2. One is mine, on which are 1 set of "Live" Workorder and related databases, and another set of "Design" Workorder and related Design databases. The other HH device only contains a set of the "Live" Workorder and related databases. The "Live" databases are shared through my HH device. The "Design" databases are not shared.

At this time I have installed 2 versions of the desktop conduit on different desktops. I am currently only using the conduit that is installed on my desktop. The Access tables are in one backend database that is installed on the server.

Right now it is only the other HH device that is creating any workorders. At the beginning of the day, he gives it to me and I sync it using the conduit on my desktop. This downloads the workorders that he has filled out into the Access tables and uploads any pending workorders (either blank workorders for any use, or partially filled workorders with instructions on them) that the office staff have created the day before.

The service rep then takes the HH device and uses it during the day to fill out the missing info on the workorders. The HH device never creates new workorder numbers, the service rep is always just filling out info on existing workorders.

The office staff processes any workorders with labor on them using an Access form and Visual Basic code which copies the complete workorders to the payroll system and deletes the processed workorder records from the tables that sync with the handheld.

The process repeats the next day, only the previous day's workorders, instead of disappearing because they were deleted by the office staff, now appear in both the Access table and the HH device's database (although without any labor on them, which was stored in a subtable)

I hope this answers your questions.

Thanks for your help.

Now off to try syncing just the workorders table in the Design databases.........
SphereMonk
 
Posts: 5
Joined: Wed Sep 29, 2010 9:09 am

Re: Deleted Recs still appear on HH Device

Postby SphereMonk » Thu Sep 30, 2010 10:22 am

Hi Dave,

I've had a chance to run some sync tests. I used the set of "Design" Workorder tables and subtables as I outlined before. I am still having the same problems with these set of relations as I am having in the "Live" tables.

I deleted the sync settings for all the subtables. I then deleted all the records in the Workorder Access Table and resynced. All the records reappeared in the Access table.

I deleted the sync settings for the Workorders table and resynced so that the table would reappear in my tables list. I then set the sync settings back up (Sync Mode: Synchronize this database, Synchronize with Access, etc.). I then deleted all the records in the Workorders Access table and resynced. All the records reappeared in the Access table.

I'm hoping that my explanations above have given you enough info to prove that I'm an idiot and don't know how this is supposed to work at all, because I just can't imagine why those records are coming back. I'm deleting these records by opening the table in Access, highlighting the records and hitting the delete key. Is it being re-added because the record is not being deleted by the HanDBase software? Is there a code that is supposed to be inserted in a "deleted" record that tells the HH device to delete it?

Thanks,

Dan
SphereMonk
 
Posts: 5
Joined: Wed Sep 29, 2010 9:09 am

Re: Deleted Recs still appear on HH Device

Postby curtterp » Thu Sep 30, 2010 12:23 pm

I do not have an iPhone, so I am cannot look at the conduit at my computer, but just a couple of thoughts. Dave can tell us if I am assuming wrong or not :D

I know that on the Windows (or was it on the Palm) conduit, there used to be a more global setting that said Computer overwrites handheld, handheld overwrites computer, and sync between. Not sure if that same setting is there or not for iPhone, but that would be one possible thing to check.

The records reappearing in Access, sounds like the iPhone has the control of what is synced. One way to check that is to sync again, after you delete the records on the iPhone and see if the reappearing records are now deleted. That could confirm what I am thinking.

Dave will have better insight on what might be happening, since it is his baby, but I thought I could try to help :D

What version of Access are you running?

Have a good day.
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 679
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Re: Deleted Recs still appear on HH Device

Postby dhaupert » Fri Oct 01, 2010 7:53 am

cutterp- thanks so much for helping with this, it's very much appreciated!

I am wondering if by chance you have any calculated fields in this database? If so, I think I know what the problem may be. In 4.6.6 of HanDBase for iPhone I had added a recalc whenever the database is opened, and unfortunately it's marking all the records as modified at that point. What that means to the algorithm is this- when a sync happens, if the conduit sees that the record was deleted on one end, but updated on another, it will bring back the record on both sides. It makes sense that if one person may have deleted a record but the other has made an addition or change to it that it should not delete, but in this case, you didn't really make a change to it.

Let me know if this is the case- if it is, then the 4.7 version due out next should solve this. Unfortunately it's not due until the end of October, as it has iOS 4.2 features in it.
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Deleted Recs still appear on HH Device

Postby SphereMonk » Mon Oct 04, 2010 11:45 am

Hi Dave, Cutterp, thanks for your help with this!

Cutterp - The records will be deleted in Access if they are deleted on the HH device. That's how I'm working around the problem right now. I haven't seen a global setting for overwriting or syncing, but the related databases are syncing correctly (deleting the records on the HH device if the record is deleted in the access table), so I don't think it's a global setting. The Access version we're using is Access 2007 SP2

Dave - Your scenario would explain what I'm seeing, but there are no calculated fields in the workorder database, or any of the related databases. The workorder database consists of (5) relationship, (2) text, (1) DB Popup, (1) Note, and (1) Date field. Are there any other actions a HH user might do to trigger the software to mark a record as modified?

UPDATE - Remember that I have 2 database workorder relationships setup? One "Design" set of relationships and one "Live" set. Well, I was able to get the "Design" set to work correctly. Let me walk you through my steps with hope that it might trigger some idea on your part what is going on. It still doesn't make much sense to me. I have not yet been able to apply anything I did to the "Live" db to get it to work correctly....

Picking up from my last sync test posting....

I attempted to test whether a workorder created by the office staff would upload to the HH, get updated by the HH User, get downloaded back to the office, get processed (and therefore deleted) by the office staff and, finally, show up as deleted on the HH.

I created a WO in Access
Synced the HH Device (my Iphone)
I updated the WO on the HH by adding a labor record in the related WOLabor DB and inventory in the related WOInventory DB.
Synced the HH Device (my Iphone)
Realized that I had forgotten to recreate the sync settings on the related dbs (I deleted them in my last sync test) because the Workorder rec came over without any of the related records
Re-created the sync settings on the related databases (not on the workorder db)
Synced the HH Device (my Iphone). All the recs came in as expected
Processed the records in Access, thereby deleting them.
Synced the HH Device (my Iphone). All the recs were deleted on the HH device as expected.

As you can see, the process is now working correctly. The only changes between this test and the sync test I performed last week was that the sync settings on the related databases have been recreated.

I've tried applying the same process to the "Live" db, but no luck as of yet. The "Live" db is used by Larry on his Iphone, although the dbs are shared by my Iphone. Here are my steps....

Deleted the sync settings for the related "Live" dbs (just the related dbs, not the Workorder db)
Synced my Iphone to get the table names back in the list on the Sync Settings form
Recreated the sync settings for the related dbs (not the Workorder db) and shared them
Synced my Iphone. The related dbs now show ABOVE the line "Current user not yet subscribed" in the Shared Tables list on the Sync Settings form on my Iphone (all the other dbs (including the Workorder db) appear below the line). All the dbs show as subscribed on Larry's Iphone.
Checked out the live Access db. There were 4 workorders that had been processed by the office staff that had been deleted from the workorder table and subtables in Access, that still existed on the HH device (on Larry's phone) in the Workorder db and related tables.
Synced Larry's Iphone, no errors in log.
Records for the 4 workorders still appear in the Workorders db on Larry's Iphone (as they did before) and have reappeared in the Workorders table in Access. All the records in the related dbs on Larry's Iphone were deleted as expected.

I'm going to keep trying recreating the syncs as I suspect the problem lies with them. If you have any ideas what may be happening I sure would appreciate them. I'll keep you posted on my progress.

Thanks again, so much, for your help.

Dan
SphereMonk
 
Posts: 5
Joined: Wed Sep 29, 2010 9:09 am

Re: Deleted Recs still appear on HH Device

Postby SphereMonk » Tue Oct 26, 2010 8:30 am

Hi all,

I have resolved the problem. The problem was the Date field on the workorder. The Default Behavior was mistakenly set to "Use Current Date" in the "Live" database set. Evidently this was causing the software to consider the record from the HH device to be "updated", and therefore ignore the fact that the record had been deleted in the Access table. I set the default behavior to "Ask for Date" and the records are now deleted correctly.

Thanks for your help.

Dan
SphereMonk
 
Posts: 5
Joined: Wed Sep 29, 2010 9:09 am

Re: Deleted Recs still appear on HH Device

Postby dhaupert » Tue Oct 26, 2010 8:33 am

Hi Dan,

Thanks for letting me know about this- I'm marking it as a bug since the iPhone version should not update the header when updating to the current date. Hopefully in the next update, you'll be able to set that setting back.. Sorry about this!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am


Return to HanDBase for Windows

Who is online

Users browsing this forum: Google [Bot] and 1 guest