Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Comparative Analysis of the same function processing in the conversion from ASP to JSP

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the conversion from ASP to JSP for the comparative analysis of the same function processing, the article introduces in great detail, has a certain reference value, interested friends must read it!

1. Objectives:

Through the comparison of the same function processing between ASP and JSP, the transformation from ASP to JSP is studied and realized. Considering the practical application, we select some representative functions related to the database, including three specific functions: query, add and delete.

Second, the introduction of the page function:

1. Database name and table name (shared)

Database name:pdtdb table name:pdtinfotable

Table structure used (shared)

Create table pdtinfotable (ID char (20) not null, ProductName char (20), primary key (ID))

two。 Functional description of each page

* 2 pages for each index,addaction:

Index: select * from table submit insert value (ID, ProductName) go to "addaction" addaction: get parameter: "ID" and "ProductName"; Do the "insert function" go back "index"

The second search uses 1 page:

Select * from table where ID= parameter "ID" or ProductName= paramenter "ProductName" submit "ID" and "ProductName"

The third delete,deleteaction uses 2 pages:

Delete: select * from table

There is another hyperlink (link to deleteaction) after each line.

Deleteaction: delete from pdtinfo where ID= parameter "ID", go back "delete"

3.JavaBean

Use tax.mydb.class

Third, code detailed comparison:

ASP to JSP,index:

StrConnection = "DSN=pdtdb;Database=pdtdb;" Set objConn=Server.CreateObject ("ADODB.Connection") objConn.Open strConnection Set objRS=Server.CreateObject ("ADODB.Recordset") Set objRS.ActiveConnection=objConn

ASP to JSP,addaction

StrConnection = "DSN=pdtdb;Database=pdtdb;" Set objConn=Server.CreateObject ("ADODB.Connection") objConn.Open strConnection Set objRS=Server.CreateObject ("ADODB.Recordset") Set objRS.ActiveConnection=objConn

ASP to JSP,search:

StrConnection = "DSN=pdtdb;Database=pdtdb;" Set objConn=Server.CreateObject ("ADODB.Connection") objConn.Open strConnection Set objRS=Server.CreateObject ("ADODB.Recordset") Set objRS.ActiveConnection=objConn

ASP to JSP,delete

StrConnection = "DSN=pdtdb;Database=pdtdb;" Set objConn=Server.CreateObject ("ADODB.Connection") objConn.Open strConnection Set objRS=Server.CreateObject ("ADODB.Recordset") Set objRS.ActiveConnection=objConn

ASP to JSP,deleteaction

StrConnection = "DSN=pdtdb;Database=pdtdb;" Set objConn=Server.CreateObject ("ADODB.Connection") objConn.Open strConnection Set objRS=Server.CreateObject ("ADODB.Recordset") Set objRS.ActiveConnection=objConn above is all the contents of the article "Comparative Analysis of the same functional processing in ASP to JSP". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report