I managed to connect to the Oracle database for express edition. I created a table :
CREATE TABLE out_patient
(
patient_id NUMBER(8) PRIMARY KEY,
first_name VARCHAR2(20),
last_name VARCHAR2(20),
gender VARCHAR2(10),
mobile_number NUMBER(12),
address VARCHAR2(20),
date_of_birth DATE,
date_of_entry DATE
);
Now I have a form to fill up all these details but, I'm getting an sqlexception:
ORA-01861:literals does not match format string
Can you tell what's causing it. Am I entering data in wrong format? I guess it might be due to 2 dates Date_Of_Birth and Date_Of_Entry. In my JDBC code I'm doing this:
String t1=text_dob.getText();
String t2=text_doe.getText();
and then,
st.setStrin(7,t1);
st.setString(8,t2);
Please let me know what I'm doing wrong.