	   import java.io.*;
	   import java.util.*;
	   import javax.swing.*;
       import javax.swing.table.*;
       import java.awt.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import jxl.*; 
import jxl.write.*;
import jxl.format.*;
 
//import java.util.Locale;
class data
	{
	public double x[];	
	public data(double[] xi)
	{
	int n=xi.length;
	x=new double[n];
	for(int i=0;i<n;i++) {x[i]=xi[i];}
	}	
	public String toString() {return ""+x[0]+" "+x[1];}
	}
	
public class data1C
{	 	
public static String toString(double x[],double y[]) 
     {   
	 String s="";
     for(int i=0;i<x.length;i++)
     {s+="x["+i+"] = "+x[i]+" y["+i+"] = "+y[i]+"\n ";}
     return s;
     }
public static void main(String args[])  throws IOException,ClassNotFoundException
{
 double number[][]=excel.read_double_from_excel("DATA1.xls","paslanmaz dalgıç pompa seçimi","B2","C21");
 double x[]=number[0];
 double y[]=number[1];    
    // load the sqlite-JDBC driver using the current class loader
    Class.forName("org.sqlite.JDBC");   
    Connection connection = null;
    try
    {
      // create a database connection
      connection = DriverManager.getConnection("jdbc:sqlite:H9.db");
      Statement statement = connection.createStatement();
      statement.setQueryTimeout(30);  // set timeout to 30 sec.      
      statement.executeUpdate("drop table if exists data1C");
      statement.executeUpdate("create table data1C(x double, y double)");
      String s2="";
      for(int i=0;i<x.length;i++)
      {
      s2=""+x[i]+","+y[i];
      statement.executeUpdate("insert into data1C values("+s2+");");
      }    
      ResultSet rs = statement.executeQuery("select * from data1C");
      while(rs.next())
      {
        // read the result set
        double xx=rs.getDouble("x");
        double yy=rs.getDouble("y");
        System.out.println(" x = " + xx+" y = "+yy);
      }
    }
    catch(SQLException e)
    {
      // if the error message is "out of memory", 
      // it probably means no database file is found
      System.err.println(e.getMessage());
    }
    finally
    {
      try
      {
        if(connection != null)
          connection.close();
      }
      catch(SQLException e)
      {
        // connection close failed.
        System.err.println(e);
      }
    }
}

}