Click here to Skip to main content
15,886,806 members
Home / Discussions / Java
   

Java

 
Questionmini game in java Pin
Member 113848203-Jan-16 20:20
Member 113848203-Jan-16 20:20 
AnswerRe: mini game in java Pin
Richard MacCutchan3-Jan-16 22:04
mveRichard MacCutchan3-Jan-16 22:04 
QuestionHow to fix the intervals on y-axis using java. Pin
Member 1223574229-Dec-15 22:21
Member 1223574229-Dec-15 22:21 
QuestionRe: How to fix the intervals on y-axis using java. Pin
Richard MacCutchan29-Dec-15 22:36
mveRichard MacCutchan29-Dec-15 22:36 
QuestionJava sqlite connection error Pin
rafiullah_Omar28-Dec-15 21:56
rafiullah_Omar28-Dec-15 21:56 
SuggestionRe: Java sqlite connection error Pin
Richard MacCutchan28-Dec-15 22:17
mveRichard MacCutchan28-Dec-15 22:17 
GeneralRe: Java sqlite connection error Pin
rafiullah_Omar29-Dec-15 18:19
rafiullah_Omar29-Dec-15 18:19 
GeneralRe: Java sqlite connection error Pin
Richard MacCutchan29-Dec-15 22:19
mveRichard MacCutchan29-Dec-15 22:19 
A couple of things first in the following code:
Java
String query="Insert into Employee values('"+txtID.getText()+"','"+txtName.getText()+"','"+txtFName.getText()+"','"+txtEmail.getText()+"')";
try{
    Sqliteconn.sqliteStmt().execute(query);
}

Do not use string concatenation in this way to create SQL statements, it leaves your code vulnerable to SQL injection, and the corruption or destruction of your database. Use properly constructed parameterised statements.
Also you should split the execute statement into two parts for easier debugging.

As to your error, you need to establish why the database is not writable by your program. Do you have permission to write in the folder where the database is stored?
GeneralRe: Java sqlite connection error Pin
rafiullah_Omar29-Dec-15 22:56
rafiullah_Omar29-Dec-15 22:56 
GeneralRe: Java sqlite connection error Pin
Richard MacCutchan29-Dec-15 23:16
mveRichard MacCutchan29-Dec-15 23:16 
AnswerRe: Java sqlite connection error Pin
rah_sin28-Dec-15 22:21
professionalrah_sin28-Dec-15 22:21 
GeneralRe: Java sqlite connection error Pin
rafiullah_Omar29-Dec-15 18:08
rafiullah_Omar29-Dec-15 18:08 
GeneralRe: Java sqlite connection error Pin
jschell30-Dec-15 7:10
jschell30-Dec-15 7:10 
GeneralRe: Java sqlite connection error Pin
rafiullah_Omar31-Dec-15 7:32
rafiullah_Omar31-Dec-15 7:32 
GeneralRe: Java sqlite connection error Pin
Richard MacCutchan31-Dec-15 22:49
mveRichard MacCutchan31-Dec-15 22:49 
GeneralRe: Java sqlite connection error Pin
rafiullah_Omar1-Jan-16 7:14
rafiullah_Omar1-Jan-16 7:14 
QuestionA question concerning Gridbag Layout... Pin
Member 1222936926-Dec-15 2:42
Member 1222936926-Dec-15 2:42 
AnswerRe: A question concerning Gridbag Layout... Pin
Richard MacCutchan26-Dec-15 4:49
mveRichard MacCutchan26-Dec-15 4:49 
QuestionHow do I combine these two variables? Pin
Member 1221935420-Dec-15 12:55
Member 1221935420-Dec-15 12:55 
SuggestionRe: How do I combine these two variables? Pin
Richard MacCutchan20-Dec-15 21:54
mveRichard MacCutchan20-Dec-15 21:54 
AnswerRe: How do I combine these two variables? Pin
Uncle Vlad20-Jan-16 8:07
Uncle Vlad20-Jan-16 8:07 
QuestionJava-String Pin
Member 1221609818-Dec-15 4:05
Member 1221609818-Dec-15 4:05 
AnswerRe: Java-String Pin
Richard MacCutchan18-Dec-15 4:19
mveRichard MacCutchan18-Dec-15 4:19 
QuestionServlet Best Practice Pin
hansoctantan16-Dec-15 22:43
professionalhansoctantan16-Dec-15 22:43 
QuestionMultithriding for server socket: ExecutorService vs ForkJoinPool vs standard threads? Pin
CodeGust15-Dec-15 0:53
CodeGust15-Dec-15 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.