SoFunction
Updated on 2025-04-14

First trial WAP wml + ASP query

After working on computers for so many years, I wrote an article online for the first time! I laughed
Program purpose: Work needs, there are too many friends who are inquiring about company registration information, which saves trouble. A query function has been added to the website. Some people actually say that there is no computer, and there should be a mobile phone without a computer. Use your mobile phone to query it anytime, anywhere, do it as you please, do a WAP query, and write it all in notepad.
The database structure is as follows:
Library name:
Table name: info
Fields: id , company name, address, legal representative… (This ellipsis means so on)
1. Feedback page
The source code is as follows:
<%@ Language=VBScript %>
<% ="text/" %>
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/ wml_1.">
<wml>
<card  title="Shangrao Industrial and Commercial Information Network">
<p>
Please enter the query information <input name="qycx" type="text" maxlength="16" />
<anchor title="OK">OK
<go href="" method="post">
<postfield name="qycx" value="$qycx"/>
</go>
</anchor>
<br/><br/>
Shangrao Industrial and Commercial Information Network
</p>
</card>
</wml>
2. Information Receive Page
The source code is as follows:
<%@ Language=VBScript %>
<%  = "text/" %>
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/ wml_1.">
<wml>
<card  title="Shangrao Industrial and Commercial Information Network">
<p>
<%
qycx=("qycx")
cx="Company Name like '%"&qycx&"%'"
Set conn=("") 
' "dsn=qycxsjk;uid=;pwd=;database=" 
 "driver={microsoft access driver (*.mdb)};dbq="&("")
sql="select * from info where "&cx&""
set rs=("")
 sql,conn,1,1
do while not 
%>
<%qymc=rs("enterprise name")
id=rs("id")
%>
<a href="?id=<% id%>" ><% qymc%></a>
<br/>
<%

loop

%>
<br/><br/>
Shangrao Industrial and Commercial Information Network
</p>
</card>
</wml>
<% Function uni(Chinese)
For i = 1 to Len (Chinese)
a=Mid(Chinese, i, 1)
uni=uni & "&#x" & Hex(Ascw(a)) & ";"
next
End Function
%> 
=================================================
Second Comment: I felt a little worried when I saw this. At first, I submitted it with the "company name" as the keyword, but later I thought that querying with the ID as the keyword avoided the problem of Chinese character submission. I have been thinking about such a basic question for most of the time. Here, we will query all the full names of the enterprises containing the keyword in the "Enterprise Name" field based on the submitted "Enterprise Name" keyword (to avoid duplication). Make a list and click to enter the third page, that is, the detailed information of the enterprise.
three,
The source code is as follows:
<%@ Language=VBScript %>
<%  = "text/" %>
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/ wml_1.">
<%
Set conn=("") 
' "dsn=qycxsjk;uid=;pwd=;database=" 
 "driver={microsoft access driver (*.mdb)};dbq="&("")
%>
<wml>
<card  title="Shangrao Industrial and Commercial Information Network">
<p>
<%
name=("id")
sql="select * from info where "
set rs=("")
 sql,conn,1,1
do while not 
%>
<%qymc=rs("enterprise name")%>
Company name: <% qymc%>
<br/>
<%zs=rs("Accommodation")%>
Residence:<% zs%>
<br/>
<%fddb=rs("Legal Representative")%>
Legal representative: <% fddb%>
<br/>
<%zczb=rs("Registered Capital")%>
Registered capital: <%
if left(zczb,1)="." then
 "0"
else
end if
zczb%>10,000 yuan
<br/>
<%qylx=rs("enterprise type")%>
Enterprise type: <% qylx%>
<br/>
<%jyfw=rs("Business Scope")%>
Business scope: <% jyfw%>
<br/>
<%zcrq=rs("Date of Founding")%>
Registration date: <% zcrq%>
<br/>
<%

loop
%>
<br/><br/>
Shangrao Industrial and Commercial Information Network-End
<br/>
<a href="">Return</a>
</p>
</card>
</wml>
=====================
OK, complete the query and display the company's detailed information!
Don't scold me if you don't write well. Hehe, friends who like WAP are welcome to communicate with me and give me some guidance! QQ:18185813