×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    2

    Question Database storage -Record Management System- problems using J2ME for voting system..

    Hi..

    I am now on a project to develop an application for mobile devices. My project is “Java based e-voting system through Bluetooth (Mobile-to-Mobile)”. So, I am fully utilized the J2ME and the Bluetooth technology. As for Bluetooth technology, I need at least one Server and several Clients in order to make my program works. For this project, both Server and Clients are using mobile devices.


    Currently, I'm facing some problems that involved the database itself. I'm using the RMS (Record Management System) for the database storage. My problems are:


    1)As Client send data to the Server through the Bluetooth connection, all previous data in the Sever are gone and being replaced with the new data that is being sent. As I'm developing a voting system, I need my Server to update the data when Client sent the data, not replacing the data. How I can do that? I don’t want to lost all the previous data in the Server.

    2)As I am using mobile phones for both Server and Client, I realized that there are limited tasks that mobile phones can do. So, I just wondering, is it possible for me to make all the database of my Client visible to Server? (eg. of database: voters' name, voters' voting, etc..)

    Really needs helps from others.

    Thank you.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Database storage -Record Management System- problems using J2ME for voting system

    I'm not sure I really understand what you're asking, but perhaps this will help?

    In terms of the bluetooth connection, the information that is sent from one phone to the other is whatever you send. You cannot "make [anything] visible". If you want to send all the data, send it.

    Likewise, if you want to update the information rather than replacing it, then simply add the new data. Why are all the previous data gone?

    Graham.

  3. #3
    Registered User
    Join Date
    Dec 2008
    Location
    Cochin, Kerala, India
    Posts
    84

    Re: Database storage -Record Management System- problems using J2ME for voting system

    For ur first problem,

    u first read the data in RMS and then update with the new value.
    If voting, and if the previous data is 1 then increment it by 1.
    The process for this, read the previous data 1 from RMS then convert it into Integer and then increment it and then write back to RMS.

    Or else u write the new entry in the next proceeding field of RMS.

    Regards
    Vineeth K.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Location
    Cochin, Kerala, India
    Posts
    84

    Re: Database storage -Record Management System- problems using J2ME for voting system

    Solution for ur second problem....

    Y u need to create a database in Client for a voting application?
    Anyways, If u wanna view it on Server, u've to just send it to server.

    Regards
    Vineeth K

  5. #5
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Database storage -Record Management System- problems using J2ME for voting system

    What im getting from ur problem is that u wanna make an account for each client and wanna update thier cotes in their corresponding account.

    What u can do is:

    1. Make a Recordstore at Server suppose clientDatabase.
    2. Follow the Record Format like this which is to be stored in RecordStore : CLIENT NAME # NUMBER OF VOTES
    example : clientOne#voteCounter

    3. Now suppose u r getting Vote from client clientOne. Then search fetch each record one by one, parse the string, take out the client name from the string and match it with the client name. If the client name found in RecordStore store the Record ID in a variable then update the value of voteCounter by increasing the voteCounter by 1. Make a new record (eg. clientOne#voteCounter) and replace the record of record ID which is hold by variable.

    But suppose if the client not exist in Recordstore then make a new record as new account for new client and add it to Recordstore and initialise the voteCounter by 1;

    may be this is somewhat helpful for u..
    thanks,
    jitu_goldie..

    KEEP TRYING..

Similar Threads

  1. Bluetooth problems using J2ME for voting system
    By izzahmeor in forum Mobile Java General
    Replies: 1
    Last Post: 2010-01-28, 09:44
  2. Problems about maemo 4.0.1 SDK installation.
    By fgg_maemo in forum General Development Questions
    Replies: 3
    Last Post: 2008-10-07, 14:26
  3. Mobile Management System
    By ammarhaider in forum General Development Questions
    Replies: 1
    Last Post: 2008-07-21, 08:01
  4. Record Management Store issue
    By kartikm0021 in forum Mobile Java General
    Replies: 7
    Last Post: 2008-06-10, 16:41
  5. Record Store Management System (RMS)
    By mister318 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2004-03-23, 16:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×