How can i go about Writing that Serialization Text File to an ArrayList
What i am Trying to do is DeSerialization which in Turn OverRide the Current Array List Person,
I think its with the CurrentEntry That its still Taken the values inside the Text Fields and putting them back into the Array.
Tony Docherty wrote:
variables called 'result' and 'results' is asking for trouble and does not make it easy to read your code.
i have to List one is list<Person> results and the other list<History> Result... which are pointing the the Person.java and History.java in the Model Package
with the
I tried Casting the Person, but it was telling me that i could not cast the Person Object.
code=java]public static int insertPatient(ActionEvent evt ){
Person r;
int resultSet = 0;
int sID = r.getsID();
String sFirstName = ((Person)r).getFirstName();
String sLastName = ((Person)r).getLastName();
String sAddress = ((Person)r).getAddress();
String sPhone = ((Person)r).getPhoneNumber();
String sql = "INSERT INTO Patient VALUES('"+sID+"','"+sFirstName+"','"+sLastName+"','"+ sAddress+"','"+sPhone+"')";
System.out.println(sql); [/code]
My Problem i feel is with the DBSQLQueries.insertPatient(evt, currentEntry); the CurrentEntry is taken the Information that is currently being displayed inside the TextFields and Sending that Information back to the Database. I added some System.out Statements inside
and this has confirmed the same thing. I tried doing DBSQLQueries.insertPatient(evt); but would not work as it will not allow me to Cast the Person Object.
Don't get me started about those stupid light bulbs. |