20201104周玉莲
一、知识总结
1、jdbc查询语句:
四个不同:SQL语句不同、调用语句不同、返回类型不同、返回值不同
2、拼写SQL:String sql ="SELECT userNAME.gendenr FROM t_user";
3、执行SQL:ResultSet rs=prepaareStatement.executeQuery();
处理结果:while(rs.next()){
system out.println(rs.getobject("userName"));
system out.println(rs.getobject("gender"));
步骤:
(1)把apache-tom集成到开发环境
windows-preference-serve-Running Environments-Add 9.0-next-Brow加载进来-finish
(2)新建项目
一建文件:file-new-web-Dynamic Web project-命名-finish
二建包:Src右键-new-package-com.laobing.bdhelper
com.laobing.bdhelper右键-class-DBHelper
复制Hbulider文件-web content
web content-other-jsp file-index.jsp-finish
项目右键-Buildpath-confiure-libraries-add lib-server Runtime-选中Apache9.0-apply and-close
server-内容右键-Add and remove-shopping-finish
项目部署到服务器
windows-preferences-web-jsp Files-Encoding:ISO 10646/unicode(UTF-8)-apply and close
windows-preferences-Text file econding:other:UTF-8
windows-preferences-general-contentTypes-Text-java source file-Defaultencoding-UTF-8
二、心得体会
一开始老师讲步骤的时候,一直都是跟不上的状态。然后老师第二遍重新讲的时候,我们把步骤一项一项写下来,认真听讲,课间通过跟小伙伴的帮助,搭建的还很顺利。慢慢的开始对数据库有了一定的了解。但是对代码还是敲得不够熟练,每一步的步骤操作连续度也不够,有机会报个班要好好学习、好好努力。
评论留言