个人信息管理系统源代码(自己写的).doc

个人信息管理系统源代码(自己写的).doc

ID:57313268

大小:125.50 KB

页数:23页

时间:2020-08-11

个人信息管理系统源代码(自己写的).doc_第1页
个人信息管理系统源代码(自己写的).doc_第2页
个人信息管理系统源代码(自己写的).doc_第3页
个人信息管理系统源代码(自己写的).doc_第4页
个人信息管理系统源代码(自己写的).doc_第5页
资源描述:

《个人信息管理系统源代码(自己写的).doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、这是一个个人信息管理系统的web应用程序,为本人学习完JSP后花了一天时间写的,虽然很粗糙,但因为所学知识不多,编程经验很少,能做到这样,觉得暂时还不错。数据库为sqlserver2005开发环境为eclipse以下是源代码。包括数据库的创建,B.java(JavaBeans放翁数据库),index.jsp(主页)和Jsp0.jsp,Jsp1.jsp,Jsp2.jsp,Jsp3.jsp,Jsp4.jsp,Jsp5.jsp,Jsp6.jsp,创建数据库createdatabasequanonprimary(name='quan_db',filename='d:quan.mdf

2、',size=5mb,maxsize=50mb,filegrowth=10%)createtablem(midchar(30)notnullprimarykey,mnamechar(10)notnull,sexchar(8),ageint,heightint,jianshuchar(50),aihaochar(50))-----------------------------------------------------------------------------------------------------------------------------------

3、-------//bean访问数据库//bean访问数据库packageb;importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.PreparedStatement;importjava.sql.ResultSet;importjava.sql.SQLException;publicclassB{privateStringname;privateStringmid;privateStringsex;privateintage;privateintheight;privateStringjia

4、nshu;privateStringaihao;publicvoidB(){name="";mid="";sex="";age=0;height=0;jianshu="";aihao="";}publicvoidsetName(Stringname){this.name=name;}publicStringgetName(){returnname;}publicvoidsetMid(Stringmid){this.mid=mid;}publicStringgetMid(){returnmid;}publicvoidsetSex(Stringsex){this.sex=sex;

5、}publicStringgetSex(){returnsex;}publicvoidsetAge(intage){this.age=age;}publicintgetAge(){returnage;}publicvoidsetHeight(intheight){this.height=height;}publicfloatgetHeight(){returnheight;}publicvoidsetJianshu(Stringjianshu){this.jianshu=jianshu;}publicStringgetJianshu(){returnjianshu;}publ

6、icvoidsetAihao(Stringaihao){this.aihao=aihao;}publicStringgetAihao(){returnaihao;}static{try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");}catch(ClassNotFoundExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}}ConnectiongetCon(Stringuser,Stringpwd){Connectioncon=null;try{con=Dr

7、iverManager.getConnection("jdbc:odbc:qdb",user,pwd);}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}finally{if(con==null){returnnull;}else{returncon;}}}voidclose1(Connectioncon,PreparedStatementps){try{if(con!=null)con.close();}c

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。