File:  [Repository] / FM2SQL / src / Test.java
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Fri Jan 21 11:27:03 2005 UTC (21 years, 3 months ago) by rogo
Branches: MAIN
CVS tags: HEAD
moved java src to src folder

    1: /*
    2:  * Created on 01.12.2004
    3:  *
    4:  * TODO To change the template for this generated file go to
    5:  * Window - Preferences - Java - Code Style - Code Templates
    6:  */
    7: 
    8: /**
    9:  * @author rogo
   10:  * 
   11:  * TODO To change the template for this generated type comment go to Window -
   12:  * Preferences - Java - Code Style - Code Templates
   13:  */
   14: import java.sql.*;
   15: 
   16: public class Test
   17: {
   18: 
   19: 	public static void main(String args[]) throws Exception
   20: 	{
   21: 
   22: 		Class.forName("acs.jdbc.Driver");
   23: 		String url = "jdbc:atinav:localhost:7227:D:\\IslamicMSS.mdb";
   24: 		String username = "Admin";
   25: 		String password = "";
   26: 		Connection con = DriverManager.getConnection(url, username, password);
   27: 	  Statement stm = con.createStatement();
   28: 	  stm.setMaxRows(21);
   29: 	  stm.execute("select * from TITLES");
   30: 	  ResultSet result=stm.getResultSet();
   31: 	  int count =0;
   32: 	  while(result.next())
   33: 	  {
   34: 	  	System.out.println(result.getString(3)+" "+count);
   35: 	    count++;
   36: 	  }
   37: 	  System.out.println(con);
   38: 	}
   39: }
   40: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>