I haven't written a java conduit but with a C/C++ conduit, you can't have
more than one DB open at a time.

-----Original Message-----
From: Malin Gillberg <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, August 24, 1999 10:20 AM
Subject: Re: Can you???


Hi Sergio and everyone else,

I'm a newbie to both this list and Palm computing so forgive me if this has
already been discussed, if I'm stupid or anything...

Are you sure that you can have multiple databases?

I'm developing a conduit i Java and I just can't create my second database.
I do something like this:

int DB_TYPE_DATA = 0x44415441;
int db1, db2;
try

    db1 = SyncManager.openDB("database1", 0,
        SyncManager.OPEN_READ | SyncManager.OPEN_WRITE |
SyncManager.OPEN_EXCLUSIVE);
}
catch(SyncException e) {
   db1 = SyncManager.createDB(CREATOR_ID, SyncManager.DB_RECORD,
        0, "database1", DB_TYPE_DATA);
}
try

    db2 = SyncManager.openDB("database2", 0,
       SyncManager.OPEN_READ | SyncManager.OPEN_WRITE |
SyncManager.OPEN_EXCLUSIVE);
}
catch(SyncException e)

    db2 = SyncManager.createDB(CREATOR_ID, SyncManager.DB_RECORD,
        0, "database2", DB_TYPE_DATA);
}

The first database creates/opens just fine, but the other just wont. When I
try to create it I get the following error message: Unknown: Error Creating
Database

I'm also developing a Palm application using KJava from Sun. To open a
database you do:

Database db = new Database(int typeID, int creatorID, int mode);

It seems like this does not support multiple databases. If it does, how do
you specify its name? On the other hand, when you create a database you do

Database.create(int cardNo, String name, int creatorID, int typeID, boolean
resDB);

Though, I have not tested to create multiple databases this way.

Please help a confused newbie.
I'd be very greatful for any help.

Malin

----- Original Message -----
From: S�rgio Carvalho <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: den 24 augusti 1999 12:18
Subject: Re: Can you???


>
> Yes. You can open as many databases as you want, either your own or some
> other application's.
>
> Jim Hay wrote:
>
> > Is it possible for a new application to use 2 of the system databases
> > (i.e. addrDB and apptDB) to store information from it's own form
> > (application to have 2 forms, a list of appointments and an edit view of
> > each appointment). All the fields from the application's editview form
> > are basic like LName, FName, date, time and a couple of custom fields.
> > Only the name fields would be written to the addrDB (not retreived) and
> > ALL the fields and their labels (except for date & time - have their own
> > apptDB fields - (apptRec.when -> startTime/endTime)) would be written to
> > the 256 byte apptRec.description field of the apptDB for storage and
> > retreival purposes. This would enable the user to see the name fields
> > when opening the Address Application and also have the appointment
> > appear on their schedule when opening the Date Book Application. Any and
> > all thoughts/ideas would be very welcome.
> >
> > Thanks
> > Jim
>
> --
> Sergio Carvalho
> ---------------
> [EMAIL PROTECTED]
>
>
>
>
>




Reply via email to