How can I set the ODBC sync to overwrite the Handheld?

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

How can I set the ODBC sync to overwrite the Handheld?

Postby jdixon » Thu Jul 09, 2009 1:19 pm

I need to force the ODBC connector (mySQL) to overwrite the PDA. I have tried under HanDBase Sync Exchange options, sync options to Desktop overwrite handheld. All this appears to to is take the Handbase Desktop version data and overwrite the handheld.

I initially sent this request in via the form option on 6/30/09

I received a response that this needed to be sent over to programing but haven't heard anything yet.

Pls advise

John
jdixon
 
Posts: 7
Joined: Tue Jun 30, 2009 1:31 pm

Re: How can I set the ODBC sync to overwrite the Handheld?

Postby DavidDevaneyJr » Fri Jul 10, 2009 10:53 am

jdixon wrote:I need to force the ODBC connector (mySQL) to overwrite the PDA. I have tried under HanDBase Sync Exchange options, sync options to Desktop overwrite handheld. All this appears to to is take the Handbase Desktop version data and overwrite the handheld.

I initially sent this request in via the form option on 6/30/09

I received a response that this needed to be sent over to programing but haven't heard anything yet.

Pls advise

John


I apologize for the delay in responding. I had to do some testing to verify a problem and a workaround.

There is currently a bug in Sync Exchange where if the Sync Options are set to Desktop Overwrites Handheld it will just grab the Desktop PDB file and move it to the Handheld, it won't first sync that with Access or the ODBC data source before it pushes the PDB file.

There are two workarounds, depending on how you need to work with the data on the device.

1. If you aren't worried about the user entering or editing records on the device and only want to push new data from the ODBC Database then you can set the Sync Options to "One Way Sync: desktop records to handheld only". That will sync any new or edited records from the Access or ODBC Database down to the handheld. The only issue
here is that if you add records on the device they won't make it back up and any edits will revert back to what's in Access or the ODBC Database.

2. If you need to always push down the database from Access or ODBC and don't have any concerns about deleting records that the users have added or edited, eg just pushing down a new price list or something, then they can use the Command Line Options for Data Exchange to import the Access database into the HanDBase Database that's in the Sync folder using a Batch or Script file. You'd still add that PDB file to the Sync Exchange settings but not set it up to Sync with Access or ODBC. Set the Sync Options to Desktop Overwrites Handheld. Then in the conduit settings in the Before Sync section set that to "Perform command before sync" and then enter the path and filename of the Batch file as the Command. That way the Batch file runs before the sync to import the data from Access or ODBC and put it in the PDB file which will then overwrite the one on the handheld when the sync happens.

In order to not lose the structure of the HanDBase database they will need to be sure to use the deletepdb:{deleterows} in the command line in the Batch file.

I hope this helps.
Regards,
David Devaney, Jr.
DavidDevaneyJr
 
Posts: 134
Joined: Tue May 19, 2009 11:01 pm
Location: Lake Worth, FL

Re: How can I set the ODBC sync to overwrite the Handheld?

Postby zooguy1492 » Fri Sep 18, 2009 11:38 pm

DavidDevaneyJr wrote:There is currently a bug in Sync Exchange where if the Sync Options are set to Desktop Overwrites Handheld it will just grab the Desktop PDB file and move it to the Handheld, it won't first sync that with Access or the ODBC data source before it pushes the PDB file.

There are two workarounds, depending on how you need to work with the data on the device.

1. If you aren't worried about the user entering or editing records on the device and only want to push new data from the ODBC Database then you can set the Sync Options to "One Way Sync: desktop records to handheld only". That will sync any new or edited records from the Access or ODBC Database down to the handheld. The only issue
here is that if you add records on the device they won't make it back up and any edits will revert back to what's in Access or the ODBC Database.

2. If you need to always push down the database from Access or ODBC and don't have any concerns about deleting records that the users have added or edited, eg just pushing down a new price list or something, then they can use the Command Line Options for Data Exchange to import the Access database into the HanDBase Database that's in the Sync folder using a Batch or Script file. You'd still add that PDB file to the Sync Exchange settings but not set it up to Sync with Access or ODBC. Set the Sync Options to Desktop Overwrites Handheld. Then in the conduit settings in the Before Sync section set that to "Perform command before sync" and then enter the path and filename of the Batch file as the Command. That way the Batch file runs before the sync to import the data from Access or ODBC and put it in the PDB file which will then overwrite the one on the handheld when the sync happens.

In order to not lose the structure of the HanDBase database they will need to be sure to use the deletepdb:{deleterows} in the command line in the Batch file.

I hope this helps.

I attempted to do option 1. What I'm trying to do is copy my existing Access database information to my Desktop and Handheld. I do not plan to change the database on either platform (only through MS Access).

I ended up having to setup a "Mapping" file for my sync to exclude an "autonumbering" field in my Access database. However, now I'm seeing multiple repeating recording in my HanDBase Desktop application (every time I sync, I see each record get ADDED to the HanDBase database again rather than replace it). Also, for some reason, my Access database is being modified.

What am I doing wrong?

Are there others out there that are sync-ing to MS Access? As I've asked before, when will the "Desktop Overwrites Handheld" Sync Exchange bug be fixed?
zooguy1492
 
Posts: 48
Joined: Thu May 21, 2009 9:18 pm

Re: How can I set the ODBC sync to overwrite the Handheld?

Postby zooguy1492 » Sun Sep 27, 2009 3:47 pm

Any comment on my last post (see above) or should I put in a support issue?

I haven't had much success sync-ing to MS Access since I bought HanDBase about 9 months ago. I've contacted product support in the past on this and was told there were Sync Exchange bugs that I was hoping would be fixed by now.

Are others getting it to work?
zooguy1492
 
Posts: 48
Joined: Thu May 21, 2009 9:18 pm

Re: How can I set the ODBC sync to overwrite the Handheld?

Postby lagunacreek » Sun Sep 27, 2009 10:41 pm

Yep... I had the same problem on databases with an autonumber key field in Access. I basically gave up for the time being and just use HDB Data Exchange to move data around... either overwrite or append depending on the situation... also depends where my "gold" copy is.
lagunacreek
 
Posts: 62
Joined: Wed May 20, 2009 5:27 pm
Location: Ben Lomond, CA

Re: How can I set the ODBC sync to overwrite the Handheld?

Postby DavidDevaneyJr » Mon Sep 28, 2009 1:54 pm

zooguy1492 wrote:I attempted to do option 1. What I'm trying to do is copy my existing Access database information to my Desktop and Handheld. I do not plan to change the database on either platform (only through MS Access).

I ended up having to setup a "Mapping" file for my sync to exclude an "autonumbering" field in my Access database. However, now I'm seeing multiple repeating recording in my HanDBase Desktop application (every time I sync, I see each record get ADDED to the HanDBase database again rather than replace it). Also, for some reason, my Access database is being modified.

What am I doing wrong?

Are there others out there that are sync-ing to MS Access? As I've asked before, when will the "Desktop Overwrites Handheld" Sync Exchange bug be fixed?


It doesn't sound like this is set up properly. I've tested this myself, which is how I confirmed the bug and came up with the workaround.

As far as I know with this set for a One Way Sync from the Desktop to the Handheld you shouldn't even need to do the mapping. Since no records should be getting synched from the device the autonumber field shouldn't be an issue.

At this point I would probably contact support as they would need to take a look at your settings files to make sure your sync exchange settings are set up properly. When you contact them please let them know if you have multiple users or if it is just your self syncing.

At this time we do not have any estimated time for that bug to be fixed.
Regards,
David Devaney, Jr.
DavidDevaneyJr
 
Posts: 134
Joined: Tue May 19, 2009 11:01 pm
Location: Lake Worth, FL

Re: How can I set the ODBC sync to overwrite the Handheld?

Postby DavidDevaneyJr » Mon Sep 28, 2009 1:57 pm

lagunacreek wrote:Yep... I had the same problem on databases with an autonumber key field in Access. I basically gave up for the time being and just use HDB Data Exchange to move data around... either overwrite or append depending on the situation... also depends where my "gold" copy is.


If you have the databases set to synchronize there will be issues with that if there is an Autonumber field in Access. This article in our Knowledgebase addresses that limitation in Access.
http://www.ddhsoftware.com/knowledgebase.html?read=233

If you were just trying to move the data from Access to HanDBase there is the bug with the Desktop overwriting the handheld but a One way sync from Desktop to Handheld should still be possible, even with the Autonumber field. However I will test that in the next day or two to confirm that is true.
Regards,
David Devaney, Jr.
DavidDevaneyJr
 
Posts: 134
Joined: Tue May 19, 2009 11:01 pm
Location: Lake Worth, FL


Return to HanDBase for Windows

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron