public void billnumber(){ try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection cn = DriverManager.getConnection("Jdbc:Odbc:ds_comboPractice"); Statement stmt = cn.createStatement(); rs = stmt.executeQuery("select max(Bill_Number) from combopractice"); int a = rs.getInt(1); txt4.setText(String.valueOf(a)); } catch (Exception ex){JOptionPane.showMessageDialog(this, ex.getMessage()); } }
int a = rs.getInt(1);
while(rs.next()){ int a = rs.getInt(1); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)