java - Double value stored as zero in the database -


I have a database in my database

I am using a prepared statement in Java class

 

  created space ps = con.preparestatement ("Enter in student values ​​(?,?,?); Ps.setstring (1, t.getUname ( ); Ps.setDouble (2, t.getUmarks1 ()); ps setDouble (3, t.getUmarks2 ()); position = ps.executeUpdate ();  

But when one Double value is sent, so it says the above error mentioned in my question.

I have another class where the gates and sets This is as follows.

  Public class user {Private string anonymous; private double umarks1, umarks2; public string getUname () {Return uname;} Public Zero SetUmen (String Anem ) {This.uname = uname;} Public double getUmarks1 () {umarks1}} Public Zero SatuMarks1 (double umarks1) {this.umarks1 = umarks1;} Public double getUmarks2 () {return umarks2;} Pub li zero zero set 2 (Double umarks2) {this.umarks2 = umarks2; }}  

If I change the data type then it saves 0 in the database. I want to save a double value how do I fix this?

I thought that the best way to do this is to get your Java

2) Repeat points fields and gears / sets to change created status

1) setDouble

View


Comments

Popular posts from this blog

eclipse plugin - Run java code error: Workspace is closed -

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -