当前位置: 技术问答>java相关
小问题请教高手:try中的语句为何不执行!!!
来源: 互联网 发布时间:2015-06-15
本文导语: import java.sql.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.Vector; import javax.swing.border.*; import java.util.*; public class tian9 extends JFrame { String s=new String("教师基本信息表"); JF...
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.Vector;
import javax.swing.border.*;
import java.util.*;
public class tian9 extends JFrame
{
String s=new String("教师基本信息表");
JFrame f=new JFrame("填加");
static int aa=1;
public void pain()
{
System.out.print(s);
}
public tian9()
{
String cn="";
f.setSize(500,100);
String url="jdbc:odbc:xlh";
System.out.print(s);
try{
aa=2;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,"sa","sqlserver");
Statement statmt = con.createStatement();
ResultSet rs=statmt.executeQuery("select * from 教师基本信息表");
ResultSetMetaData dmd=rs.getMetaData();
//ResultSet rs=dmd.getColumns("","","专利信息表","%");
aa=dmd.getColumnCount();
System.out.print("*");
for(int i =1; i
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.Vector;
import javax.swing.border.*;
import java.util.*;
public class tian9 extends JFrame
{
String s=new String("教师基本信息表");
JFrame f=new JFrame("填加");
static int aa=1;
public void pain()
{
System.out.print(s);
}
public tian9()
{
String cn="";
f.setSize(500,100);
String url="jdbc:odbc:xlh";
System.out.print(s);
try{
aa=2;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,"sa","sqlserver");
Statement statmt = con.createStatement();
ResultSet rs=statmt.executeQuery("select * from 教师基本信息表");
ResultSetMetaData dmd=rs.getMetaData();
//ResultSet rs=dmd.getColumns("","","专利信息表","%");
aa=dmd.getColumnCount();
System.out.print("*");
for(int i =1; i