Home > Archive > SQL Anywhere ultralite > August 2005 > Ultralite .Net/C# sync problems









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Ultralite .Net/C# sync problems
Madhu Siddalingaiah

2005-07-28, 1:26 pm


Running 9.0.2.3044

I'm in the early phases of developing a .Net/C# Pocket PC version of a
working Palm application. The database and MobiLink is known to work
correctly.

I used the Ultralite .Net tutorial as a guide and built a C# app with a
single form that performs a simple query against one of our tables. I am
using TCPIP synchronization for initial development and testing.

The app comes up fine and I am able to insert/select from the tables
without any problems. When I call Conn.Synchronize(), MobiLink responds
and appears to complete without incident, but the Pocket PC emulator
does not return from the Conn.Synchronize() call. If I stop the
debugging session and restart, the data seems to have synchronized OK (I
can see the data).

I have two problems:

1. The call to Conn.Synchronize() does not return
2. If I restart and call Conn.Synchronize() again, I get an exception:

"You cannot synchronize or upgrade with uncommited transactions".

Here's the code I'm using to synchronize:

Conn.SyncParms.Stream = ULStreamType.TCPIP;
Conn.SyncParms.Version = "ERx_2.0";
Conn.SyncParms.StreamParms = "host=RIVC03NW1020";
Conn.SyncParms.UploadOnly = false; // Not sure if I need this...
Conn.Synchronize();

Also, is there a code sample somewhere that uses ULSyncProgressListen
er
with Synchronize()?
Madhu Siddalingaiah

2005-07-28, 8:23 pm


OK, I found the problem: there wasn't a problem ;-)

The TCPIP sync is really slow and I had 30,000+ rows to insert.
I got the ULSyncProgressListen
er working which confirmed the download
state and the rate of inserts.

The fact that MobiLink immediately reported "Synchronization complete"
was throwing me off. I thought the sync was complete, when apparently it
was not.

On a more pedestrian note, is it possible to pre-generate an Ultralite
database for Pocket PC and then load that??

Madhu Siddalingaiah wrote:
>
> Running 9.0.2.3044
>
> 1. The call to Conn.Synchronize() does not return
> 2. If I restart and call Conn.Synchronize() again, I get an exception:

David Fishburn

2005-07-29, 9:23 am

Madhu Siddalingaiah < msiddalingaiah@bcbsa
l.org> wrote in news:42e93947
@forums-2-dub of sybase.public.sqlanywhere.ultralite:


> The TCPIP sync is really slow and I had 30,000+ rows to insert.
> I got the ULSyncProgressListen
er working which confirmed the download
> state and the rate of inserts.
>
> The fact that MobiLink immediately reported "Synchronization complete"
> was throwing me off. I thought the sync was complete, when apparently

it
> was not.


Well, from it's perspective it was.
It had created the download stream and sent it to the device.
MobiLink was free to move on to the next synchronization.

The fact that it took a slow device a long time to "process" the
downloaded data is where the time was taken.

> On a more pedestrian note, is it possible to pre-generate an Ultralite
> database for Pocket PC and then load that??


Not that I am aware of.
You would have to essentially build your own unload/reload tool.
Having said that, any data reloaded would be "uploaded as new inserts" on
your next synchronization.


--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Michael Thode

2005-07-29, 11:24 am

If you want to populate the udb file on the desktop look at the ulsync
utility (ulload/unload might be useful as well). ulsync allows you to do a
sync to prepopulate the database on the desktop.

Other utilities are ulxml and ulisql.

Mike

"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
news:Xns96A25E4D9314
Bfishburnsybasecom@1
27.0.0.1...
> Madhu Siddalingaiah < msiddalingaiah@bcbsa
l.org> wrote in news:42e93947
> @forums-2-dub of sybase.public.sqlanywhere.ultralite:
>
>
> it
>
> Well, from it's perspective it was.
> It had created the download stream and sent it to the device.
> MobiLink was free to move on to the next synchronization.
>
> The fact that it took a slow device a long time to "process" the
> downloaded data is where the time was taken.
>
>
> Not that I am aware of.
> You would have to essentially build your own unload/reload tool.
> Having said that, any data reloaded would be "uploaded as new inserts" on
> your next synchronization.
>
>
> --
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng9 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/swx/sdmain.stm
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> CaseXpress - to report bugs
> http://casexpress.sybase.com
>
> CodeXchange - Free samples
> [url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
>



Madhu Siddalingaiah

2005-07-29, 8:23 pm


Are you saying that Ultralite on Pocket PC uses the same UDB file format
created by ulsync? I can see the database files on the Pocket PC (can't
see the file extension though).

That would be great -- we are doing that to generate UL PDB files for
Palm OS.

Michael Thode wrote:
> If you want to populate the udb file on the desktop look at the ulsync
> utility (ulload/unload might be useful as well). ulsync allows you to do a
> sync to prepopulate the database on the desktop.
>
> Other utilities are ulxml and ulisql.
>
> Mike

Philippe Bertrand

2005-08-01, 9:23 am

The desktop Unicode udb format is identical to the CE udb format - just make
user you create a Unicode database instead of a mbcs on the desktop and you
will be fine.

The tools understand 3 different udb formats; mbcs, Unicode and palm. You
just have to make sure you create the correct type for your deployment
environment.

--
- Philippe Bertrand
iAnywhere Solutions, Inc.

Please include in your subject line what UltraLite API are you using
(I.E. UltraLite.NET, Native UltraLite for Java, Embedded SQL, C++,
(pure) Static Java UltraLite, etc.). Please include version and BUILD
numbers in your post.

"Madhu Siddalingaiah" < msiddalingaiah@bcbsa
l.org> wrote in message
news:42ea89c8$1@foru
ms-2-dub...
>
> Are you saying that Ultralite on Pocket PC uses the same UDB file format
> created by ulsync? I can see the database files on the Pocket PC (can't
> see the file extension though).
>
> That would be great -- we are doing that to generate UL PDB files for Palm
> OS.
>



David Fishburn

2005-08-02, 9:23 am

Madhu Siddalingaiah < msiddalingaiah@bcbsa
l.org> wrote in
news:42ea89c8$1@foru
ms-2-dub of sybase.public.sqlanywhere.ultralite:

>
> Are you saying that Ultralite on Pocket PC uses the same UDB file
> format created by ulsync? I can see the database files on the Pocket
> PC (can't see the file extension though).


Madhu, I set all of this up (and checked it in) when I was working with you
on this project.

The files were under:
test\ul_remote\run_s
ync.cmd

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com