Home > Archive > SQL Anywhere ultralite > February 2006 > ul_udb_* corruption?









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 ul_udb_* corruption?
Nik

2006-02-04, 3:23 am

Our application is crashing in PalmLaunch. It causes the device to
reset. There is no way out of this cyle of Entering the app and then
the device resetting. The App has been running great for awhile when
this occured. Its a bug we have seen with some of our users on Palm TX
machines. We tried beaming the 3 ultralite pdbs to another device and
that fixed the problem! Another very interesting observation is that
there is a difference in the ul_udb_*.pdb between the bad device and a
good one. Here is the difference...
The ul_udb_*.pdb on the good device has a first record of 54bytes
and all other records are of 4098 bytes. On the device where the app
crashes, the LAST record is 54 bytes and all the others are 4098 bytes.
On seeing this (and on a hunch) We wrote code to open the bad pdb file
and make a copy (ul_udb_copy.pdb) where we created it backwards. This
caused the last record(54 bytes) to now become the first record. We
then renamed this new pdb to ul_udb_*.pdb ...And guess what! This fixed
the crash!
Now, We have noidea how the Ultralite database is layed out
within the Palm pdb format but it looks like every now and then
something is going wrong with the file. Could be a Palm issue with
NVFS and committing changes from the DBCache.? I would love to know
whats going on here. Any Ultralite folks care to throw some light on
this?
Why does it work when we beam the bad pdb file to another
device? We do notice that the file size (Not the number of records) is
different but this could be due to the way PalmOS allocates memory for
files in chunks (?).

thanks for reading on this far :)

-Nik

Rafael

2006-02-06, 9:23 am

I had a similar issue in pocket pc development. I was using appForge
and ultralite.
When we make a bunch o select statements and in those we have inner
joins, we got a SQLE_TOO_MANY_TEMP_T
ABLES.
After get a lot of those errors, the database (udb file) get corrupted
and we lose all information.
After googling and making some research, we discovered that if we make
a lot of selects and dont close the ULPreparedStatement and
ULResultSet, we get this errors and those corruptions.
I dont know if this is your case, but you may try to close re
resultsets after using

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