sqlquery.java
来自「图书管理系统」· Java 代码 · 共 43 行
JAVA
43 行
/*
* sqlquery.java
*
* Created on 2007年6月21日, 下午8:39
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package 图书管理系统;
import javax.swing.border.*;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
/**
*
* @author Sunshine
*/
public class sqlquery {
/** Creates a new instance of sqlquery */
public sqlquery() {
con=connect.getcon();
stmt=connect.getstmt();
}
private Connection con;
private Statement stmt;
public void update(PreparedStatement sql)
{
try{
//double n=Double.parseDouble(T_price.getText().trim());
sql.executeUpdate();
JOptionPane.showMessageDialog(null,"数据添加成功");
}
catch(Exception ee)
{
JOptionPane.showMessageDialog(null,"数据库访问失败!");
ee.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?