我是靠谱客的博主 细腻寒风,这篇文章主要介绍Java修仙道路_JAVA修仙??,现在分享给大家,希望可以做个参考。

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

pageEncoding="UTF-8" import="java.sql.*"%>

function Confirm() {

s = confirm("后台系统无需使用此方法!")

}

Connection conn=null;

Statement stmt=null;

ResultSet rs=null;

try{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

String strConn="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ShopSystem";

String User="sa";

String Password="123456";

conn=DriverManager.getConnection(strConn,User,Password);

String sqlSentence1="Select p_id,p_type,p_name,p_price,p_quantity,p_image from Product Order by p_id desc;";

stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

rs=stmt.executeQuery(sqlSentence1);

String str=request.getParameter("page");

if(str==null)

str="0";

int pageSize=10;

rs.last();

int recordNum=rs.getRow();

int maxPage=(recordNum%pageSize==0)?(recordNum/pageSize):(recordNum/pageSize+1);

int currentPage=Integer.parseInt(str);

if(currentPage<1)

currentPage=1;

if(currentPage>maxPage)

currentPage=maxPage;

rs.absolute((currentPage-1)*pageSize+1);

%>

产品编号产品类别产品名称产品价格产品数量产品图片更新|描述插入|删除
<%=rs.getstring(" width="80">更改方式1

更改方式2

">删除

if(!rs.next())

break;

}

%>

JumpTo:

1){%>

FirstPage

PreviousPage

||

NextPage

LastPage

}catch(Exception e){

out.println(e.getMessage());

}

if(rs!=null)rs.close();

if(stmt!=null)stmt.close();

if(conn!=null)conn.close();

%>


最后

以上就是细腻寒风最近收集整理的关于Java修仙道路_JAVA修仙??的全部内容,更多相关Java修仙道路_JAVA修仙内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(95)

评论列表共有 0 条评论

立即
投稿
返回
顶部