|
Home > Archive > SQL Anywhere ultralite > October 2005 > Same database file on PC (java) and pocket pc (.NET/C#)
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 |
Same database file on PC (java) and pocket pc (.NET/C#)
|
|
|
| Hi!
Im wondering if it's possible to use the same database file on the
pocket pc and on a pc.
My intention is to let users add information to a ultralite database on
the pocket pc. The database file resides on a SD-card. This isn't any
problem, but i also want to let the user take out the sd-card at the
end of the day, and work with the database file on a regular pc.
The reason that this situation has arisen is too long to discuss here,
it's just that way =).
So, is this possible? And how do i go about accomplishing this? Is
there any example code in java available that manipulates, or at least
reads information from a pocket pc ultralite database on a pc? Or any
other resources about this that someone could recommend?
//Kind Regards, Torbjorn
| |
|
| Well, seems like i have answered my own question, after fiddling a bit.
I can work with the same udb file on my pocket pc and in my java
application written for the pc.
There's just one problem left to solve. I can't connect to the udb file
when running the java program on a machine that hasn't Sql Anywhere
Studio installed.
On the computer that has Sql Anywhere Studio installed, i copied
test.udb, Test.class jul9.jar and jul9.dll to a separate new
directory, and succesfully ran the java program with
java -classpath ".;jul9.jar" Test
Working like a charm.
When trying the same on a different computer (without Sql Anywhere
Studio installed) I get "Exception: Unable to start specified
database".
I added -verbose to java command, and redirected the output to a file,
both on the working and the not working computer. Doing a diff on these
two files, i can se that excactly the same jars are loaded.
Anyone that has any ideas on why it isn't working on the computer that
hasn't Studio installed. What do i need to do to get it to work?
//Regards, Torbjorn
| |
|
| Ok... I like to reply to my own posts.....
Anyway, i solved the problem with running the java application on a
computer that haven't SQL Anywhere Studio installed. It was a stupid,
stupid thing. The path to the database wasn't proper.
So, now i got a java application residing on a SD Card, which the user
can run on any computer that has java installed (and a SD Card-reader,
of cuz). And they can work with the database whether it's on a pocket
pc or a regular pc.... sweeeet....
//Regards, Torbjorn
|
|
|
|
|