Hello,
I want connect my database created in access with my j2me code.
How can I do this?
Can you provide some codes?
Hello,
I want connect my database created in access with my j2me code.
How can I do this?
Can you provide some codes?
http://wiki.forum.nokia.com/index.ph...ta_from_server
http://wiki.forum.nokia.com/index.ph...tps_in_Java_ME
http://wiki.forum.nokia.com/index.ph...ent_in_Java_ME
http://wiki.forum.nokia.com/index.ph...est_in_Java_ME
You then need to write the server-side code to correspond to the client (and have the server-side do the database access for your client app).
Hi,
What is the package need to be imported for j2me db connectivity?
There is no "package" to "import". J2ME has no built-in, direct database connectivity support. You have to design/code it yourself using TCP/IP socket calls or higher-level protocols like HTTP.
Hi,
Is there any built in application for j2me db connection in WTK2.5.1 or anywhere else ?
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
Hi,
I am trying to create a recordstore to store data in j2me. I have written some code but it is not running and gives some errors.
Can you tell why is the code not running?
Here the code is:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.rms.*;
//import javax.microedition.rms.RecordStoreException;
public class RecordStore extends MIDlet
{
Form mainForm;
public RecordStore ()
{
String con_name=null;
String con_loc=null;
int con_num=0;
try
{
mainForm = new Form ("RMS");
RecordStore rs = RecordStore.openRecordStore("MyContacts", true);
rs.con_name = "abc";
rs.con_loc = "aa";
rs.con_num = 111;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream os = new DataOutputStream(baos);
os.WriteUTF(rs.con_name);
os.WriteUTF(rs.con_loc);
os.WriteInt(rs.con_num);
os.close();
byte[] data = baos.toByteArray();
int id = recordStore.addRecord(data,0,data.length);
/*byte[] data1 = baos.toByteArray();
DataInputStream is = new DataInputStream(new ByteArrayInputStream(data1));
rs.con_name = is.readUTF();
rs.con_loc = is.readUTF();
rs.con_num = is.readInt();
mainForm.append(con_name);
mainForm.append(con_loc);
System.out.println(con_num);
is.close();*/
rs.closeRecordStore();
}
catch(Exception e1){}
}
public void startApp()
{
Display display = Display.getDisplay (this);
display.setCurrent (mainForm);
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
}