import java.sql.*;
import java.io.*;

public class trial4 {
	public static void main(String args[]) throws IOException
  {
    Text cin=new Text();
    String url = "jdbc:odbc:prog";
    Connection con;
		Statement stmt;
    ResultSetMetaData rsm;
    String query1 = "select * from KAHVE1 order by [ID]";
		try
    {
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    }
    catch(java.lang.ClassNotFoundException e)
    {
      System.err.print("ClassNotFoundException: ");
      System.err.println(e.getMessage());
    }
		try
    {
      con = DriverManager.getConnection(url,"myLogin", "myPassword");
			stmt = con.createStatement();
      ResultSet rs=stmt.executeQuery(query1);
      //System.out.println("update count="+stmt.getUpdateCount());
      int iv=0;
      while(rs.next())
      {
         iv++;
         double ss=rs.getDouble("FIYAT");
         ss=ss*1.1;
         rs.updateDouble(4,ss);
      }  //while
			stmt.close();
			con.close();
		}
    catch(SQLException ex)
    {
			System.err.println("SQLException: " + ex.getMessage());
		}
	}
}
