注册 登录
编程论坛 J2EE论坛

求 【增 改 删查 代码】 谁有~~~~~~~~~~~~

xe569886048 发布于 2010-07-16 13:07, 1412 次点击
遇到了点点麻烦 谢谢大家帮忙!!!
谁有JSP的【增 改 删查 代码】  贡献出来吧!!
 深谢
15 回复
#2
流星雨2010-08-02 13:02
这个很简单啊............
#3
jakend2010-08-05 14:58
增删改查都需要人家给?
#4
jackieli20742010-08-05 17:24
这..........刚进公司两天         经理第一天让写这个    你不会是咱公司新来的吧
#5
panghaichao2010-08-09 11:38
增删改的代码还要?
#6
失眠的泪水2010-08-16 23:13
你连这个基本的知识都写不出来,那请问你的JSP学到什么程度了哦?很纳闷……
#7
syg54342010-08-17 14:44
insert into
delete
update
select

#8
wing77422010-08-19 21:01
以下是引用syg5434在2010-8-17 14:44:00的发言:

insert into
delete
update
select
正解
#9
lihongfei1732010-08-20 11:05
无语了
#10
踏月留香2010-09-12 16:56
增:
Connection conn=SQLHelper.getConnection();
try
{
     String sql="insert into user1 values(?,?)";
     PreparedStatement pstm=conn.preparedStatement();
     pstm.setString(1,"xiao");
     pstm.setString(2,"1988");
     pstm.execute();
     conn.close();
}
catch(Exception ex)
{
}
#11
踏月留香2010-09-12 16:58
删:
Connection conn=SQLHelper.getConnection();
try
{
     String sql="delete from user where username=xiao";
     Statement stm=conn.createStatement();
     stm.execute(sql);
     conn.close();
}
catch(Exception ex)
{
}
#12
踏月留香2010-09-12 17:00
查:
ArrayList<user1> list=new ArrayList<user1>();
Connection conn=SQLHelper.getConnection();
try
{
     String sql="select * from user1";
     Statement stm=conn.createStatement();
     ResultSet rs=stm.executeQuery();
    while(rs.next())
   {
            user1 my=new user1();
            user1.setUsername(rs.getString("username"));
            user1.setPasswrd(rs.getString("passwrd"));
            list.add(user1);
    }
     conn.close();
}
catch(Exception ex)
{
}
#13
踏月留香2010-09-12 17:01
至于改就是SQL语句用Update ************,跟上面差不多。
#14
SoftWarezx2010-09-13 11:40
直接去网上找个项目吧!
#15
ablikim2010-09-13 14:28
以下是引用syg5434在2010-8-17 14:44:00的发言:

insert into
delete
update
select
#16
sunchinajn2010-12-22 22:00
楼上正解
1