09-19-2008 02:40 AM
i need help in the for Database connection.
how to start the DB connection?...
what Database is best(sql,access,etc....)...
what are the necessary things i should have for starting the db connectivity program?...
samples and examples will help a lot.
09-19-2008 05:03 AM
The first question you should ask is "What database connectivity does the BlackBerry support?"
Use the Search field (I suggest searching for the term "database") to find other Threads from people who have asked similar questions.
09-22-2008 02:09 AM
Can anybody tell me is it possible to do database connectivity in Blackberry using Java.
I made a search on the site
some said no direct database connectivity is possible using Java...
some said it is possible by using 3rd party...but the 3rd party supports the Device PresistentStore.
if it is possible to connect...pls post the sampe code for the connectivity....
09-22-2008 06:27 AM
If you can find my earlier post, there was a thread that got someone who has a commercial phone app claiming to implement
a local database. In any case, I had a few specific interests and, while I can't answer your question from experience, let
me post a few links that may help as I was curious about a few things myself.
First, everything that you could reasonably hope to use would come down to being some type of socket. Presumably,
you would have some cooperative rather than antagonistic relationship with the database provider who could make
it available via some API, for example as various forms on a web server. Alternatively, the J2SE supports something
called JDBC, ( which comes up on google as the first hit if you confine a search with site:sun.com):
If you are not familiar with java, I would suggest looking at Sun first and the J2SE or EE support. This is likely to give you
some idea of what would be available on the DB side and what to look for or implement yourself in a more constrainted environment
such as a phone.
05-19-2009 06:32 AM
I can't rememeber which questions were asked on this thread but being rather taken with my own approach, let me reiterate.
There are maybe three questions you could ask that include the word database:
1) How do I access a remote DB?
2) How do I create a local DB?
3) How do I manipulate DB search results or temporary data ( what associative containers exist)?
AFAIK, there is no uniformly supported JSR for J2ME that implements JDBC but you can go to sun and search the JSR's for
DB and look at JDBC4.0 spec for ideas. You are always free to create your own webpages and open your own http connections
and send an SQL query to your webpage and get back a result set in the format of your choice ( xml text or binary).
JDBC is not magic, anything off of the phone will involve sockets which, within business related limits imposed by RIMM or
carrier, let you do anything you want.
For local DB, sure, if you had jdbc you would not care about which DB is where, but in this environment it can be a big
issue. AFAIK, on BB your option is essentially persistent store with your own container classes. If you can find my
posts, I offer one solution that also addresses question 3 above.
If you write your own associative containers and group them together ( conceptually no different than a bunch of tables from
a DB) and use persistent store, the temporary or permanent nature is transparent to your code and it still acts like a DB.
I wrote my classes with my own interface ( even getting rid of various overloaded function names with quirky ones so
I could search more easily for the references ) but any set of containers for target and index data with add delete find and
reorg functions will work. So far, I've found a basic threaded tree ( B-tree with simultaneous linked list structure )
works well ( you could even argue about need for the linked list as traversing a tree is not that difficult for sequential
access but I'm still playing with this for use in more complicated index structures. ).
05-19-2009 07:35 AM
i want to create an application similar to ap news
my ui is like this,
have a title, a listfield and the status bar.
my list has image on the left and two labelfields on the right
I have button on the status bar to push different screens.till now i was using only static img and labelfields with all alignment.
now my issue is create a table (parse a xml file given by the client) and occupy the table rows and columns with those values.
now i must use this table row values (url) in the place of image and label fields on my listfield so that i get latest news through it.
xml file can be parsed and values can be reteived.but my concern is the values are refreshed when my refresh button is pressed and when my application is opened (only these two cases).
all other times data from the table must be used bcoz,everytime parsingand displaying values for each action may makethe application slow
hope i make u understand
05-19-2009 07:47 AM
I think the reuters app used push which would make more sense but in any case you can poll with
an if-modified-since header. You still need a server that respects this and have a round trip delay but otherwise
not that bad AFAIK.
05-20-2009 02:31 AM
yes,similar to reuters app.how to implement apps of that type?what to be used?
I require a complete good explanation for it as i am a beginner.
07-29-2009 02:02 AM
I have downloaded and installed SQL Anywhere 11 that comes with UltrLiteJ that adds basic database functionality to Java applications and is compatible with BlackBerry smartphones.
Could someone kindly explain in detail how to connect a BB app with UltraLiteJ database. Please explain stepwise from the very scratch as i am a beginner in BlackBerry Development.