📄 sqlquery.java
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -