Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Servlet/JSP/JSF/JavaFX Script  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to postflat modethreaded modego to previous topicgo to next topicgo to back
作者 是不是SQL语句错了?!不解中...
wind520sand





发贴: 36
于 2005-09-17 14:50 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我想用网页输入数据然后保存在MYSQL的表中
<%@page import="wind.*"%>
<%@page import="java.sql.*"%>
<%

String name = request.getParameter("name");
 String pass = request.getParameter("pass");
 ConDB con = new ConDB();
 String inp = "insert into login values('"+name+"','"+pass+"')";
ResultSet rs = con.executesql(inp);
%>
这是我的JSP代码.可以运行.但是在数据库中却没有新加的记录啊.我都不知道怎么回事啊.请大家帮帮我.谢谢了!
ConDB.class是我的连接数据库的类.我测试过是OK的
name pass这两个变量是我想输入的数据
我还想多问一句.values('"+name+"') 为什么要这么多的引号啊?





话题树型展开
人气 标题 作者 字数 发贴时间
2897 是不是SQL语句错了?!不解中... wind520sand 471 2005-09-17 14:50
2448 Re:是不是SQL语句错了?!不解中... chengbd 49 2005-09-18 05:24
2415 Re:是不是SQL语句错了?!不解中... Ada1979 20 2005-09-23 19:07
2460 Re:是不是SQL语句错了?!不解中... wind520sand 701 2005-09-28 09:18
2490 Re:是不是SQL语句错了?!不解中... wind520sand 1046 2005-09-18 09:29
2402 Re:是不是SQL语句错了?!不解中... wind520sand 31 2005-09-20 08:30
2409 Re:是不是SQL语句错了?!不解中... chengbd 23 2005-09-20 09:02
2318 Re:是不是SQL语句错了?!不解中... why 191 2005-09-20 12:00
2453 Re:是不是SQL语句错了?!不解中... java菜鸟2005 88 2005-09-20 15:35
2390 Re:是不是SQL语句错了?!不解中... wind520sand 30 2005-09-20 18:16
2418 Re:是不是SQL语句错了?!不解中... dennisjl 53 2005-09-22 09:40
2411 Re:是不是SQL语句错了?!不解中... 沙漠小鸟 115 2005-09-22 13:07
2616 Re:是不是SQL语句错了?!不解中... beyond1984 1422 2005-09-23 10:32

reply to postflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923