| Article: |
Invoking JavaServer Pages from MIDlets | |
| Subject: | extending the codes to write to database(MySQL) | |
| Date: | 2003-06-26 20:47:02 | |
| From: | anonymous2 | |
|
How can I extending the codes given to accept ID and Name from MIDlet and store those values in MySQL database via JSP file. Writing a single value to the database is no problem, but if more than one value it appears to store as a concatanate value in a single column instead of separate values in separate columns. eg.ID=krn and Name=Karen, but store in ID column(MySQL database) as krnKaren.
|
||
Showing messages 1 through 1 of 1.
-
extending the codes to write to database(MySQL)
2003-08-16 01:47:59 martinlund [View]



u´r code:
os = c.openOutputStream();
os.write((myid).getBytes());
os.write((myname).getBytes());
new code:
os = c.openOutputStream();
os.write(("ID="+myid).getBytes());
os.write(("&Name="+myname)).getBytes());
The & is neccesary to make the recevier able to split up the OutputStream...
Martin