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 (19 years, 3 months ago) by rogo
Branches: MAIN
CVS tags: HEAD
moved java src to src folder

/*
 * Created on 01.12.2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author rogo
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
import java.sql.*;

public class Test
{

	public static void main(String args[]) throws Exception
	{

		Class.forName("acs.jdbc.Driver");
		String url = "jdbc:atinav:localhost:7227:D:\\IslamicMSS.mdb";
		String username = "Admin";
		String password = "";
		Connection con = DriverManager.getConnection(url, username, password);
	  Statement stm = con.createStatement();
	  stm.setMaxRows(21);
	  stm.execute("select * from TITLES");
	  ResultSet result=stm.getResultSet();
	  int count =0;
	  while(result.next())
	  {
	  	System.out.println(result.getString(3)+" "+count);
	    count++;
	  }
	  System.out.println(con);
	}
}


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