Hi,
i'm developing a java program that synchronizes data in the palm with a oracle
database. the approach that i'm using is:
1. a conduit make a select to oracle
2. it verifies if the current number of records in the palm equals to in the oracle
db. if dont, erase the entire palm db, creates it again and add all the records.
i'm successfully synchronizing the db between palm and oracle. the database has
5430 entries. the problem is that i cannot read the db in the palm: it returns me 0
records, even if the "info" menu item shows me 5430 records.
the conduit and also the kvm documentation is very very sparse. i have already
searched all the documentation (pdf, html, examples, internet, this list archives),
but not elucidate the question.
one of the most confusing terms used in the documentation is dbType. sometimes it
refers to one thing, some other times to another.
i need to know the RELATION OF THE PARAMETERS in the methods bellow:
1. Class palm.conduit.SyncManager
// Creates a new database on the Palm OS device)
public static int createDB
(int creator, //The creator of the database
int flags, // flags - Res/Rec/RAM
int cardNo, // The card on which to create the database
String name, // The target database name
int type // For example the hexadecimal value of
"sysFileTApplication"
) throws SyncException
ps: what the hell is sysFileTApplication? how did it get in the java documentation?
2. Class com.sun.kjava.Database:
public Database(
int typeID,
int creatorID,
int mode)
Open a database.
Jesus! only one line of documentation??????
3. Conduit Configuration program: used to enable my conduit to be used by the Hot
Sync. Its parameters:
Conduit: jsync.dll
Creator ID: GUIC
Directory: QSync
File: (blank)
Remote Database: QVoteDB
Name: QVoteSync
Username: (blank)
Priority: 0
Information: QVote Socio Conduit
class name: QVoteSync
class path: j:\classes111.zip;d:\palmprojects\
VM: SUN
Since i use method 1 to let the conduit create the database in the palm and
method 2 to open it in the palm, the parameters have to match
bellow are the method calls that i use in my programs:
1. db = SyncManager.createDB(creatorId, SyncManager.DB_RECORD, 0, name,
str2int(sysFileTApplication));
/* where
creatorId = 0x47554943; //str2int("GUIC");
String sysFileTApplication = "appl" // i've got it in a header file
name = "QSDB"
*/
2. db = new Database(dbType, dbCreator, Database.READWRITE);
/* where dbType = str2int(sysFileTApplication) - same as above */
Here are some more questions:
a) are the parameters matching?
b) i want to have 3 databases for the application: QSDB, QCDB and QIDB. where, in what
method, i specify the one to use?
c) what are the difference between a RECORD and a RESOURCE?
d) why i have to have a application with the same creatorId that my databases uses? i
read in somewhere that the index of the databases are creatorId+typeId. is this true?
and the name of the db?
sorry, the e-mail is quite long...
thanks in advance.
guich.