Forums Register Login

help!! i need help for my moblie database project..

+Pie Number of slices to send: Send
i recently doing a project on moblie database. i get from this site http://www.java-tips.org/content/view/356/39/
but i got problem compiling it show me these errors:
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:162: 'class' or 'interface' expected
import java.io.*;
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:163: 'class' or 'interface' expected
import java.text.*;
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:164: 'class' or 'interface' expected
import java.util.*;
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:165: 'class' or 'interface' expected
import javax.servlet.*;
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:166: 'class' or 'interface' expected
import javax.servlet.http.*;
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:167: 'class' or 'interface' expected
import java.sql.*;
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:233: not a statement
"jdbc racle:thin:@localhost:1521:"+db,user,pwd);
^
C:\WTK22\apps\testMySQLSuite\src\testMySQL.java:233: ';' expected
"jdbc racle:thin:@localhost:1521:"+db,user,pwd);
^
8 errors
com.sun.kvem.ktools.ExecutionException

is there anyone can help me on this? thanks..
+Pie Number of slices to send: Send
i'm assuming you put all that into one file? you can't have import statements in the middle - they must be at the beginning...

try putting each class in it's own file, appropriatly named, and see if that helps.
+Pie Number of slices to send: Send
Hi,

You need to compile MIdlet with necessary java class files, I assume you have set class path for same.Servlet class should be put in web server.

The error that you are recieving of ";" is probably becuase you need to comment that line, it shows the connection string for oracle database.If you want to connect to oracle database you should look at the code and accordingly uncomment or comment the lines.
Example shows connection with mySQL database but it also has commented code to connect to oracle and SQL.Though I have corrected code on tip URL.
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 730 times.
Similar Threads
Sql operation on mobile
mmapi problem
sending SMS through PC
New to J2ME
what system info is available?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 22:11:32.