After so many years of computing, I wrote an article online for the first time! Laugh at the purpose of the program: work needs, there are too many friends who query enterprise registration materials, save the trouble, and increase the query function on the website. some people say that there is no computer, no computer.
After so many years of computing, I wrote an article online for the first time! Laugh
Program Goals: work is required. there are too many friends who query enterprise registration materials, which saves the trouble and adds query functions on the website. some people say that there is no computer and there is no computer, so they should have a mobile phone. You can use a mobile phone to query data anytime, anywhere. you can do whatever you want, and make a WAP query, all written in Notepad.
The database structure is as follows:
Database name: data. mdb
Table name: info
Field: id, company name, domicile, legal representative ...... (This ellipsis is, and so on)
I. feedback page hello. asp
The source code is as follows:
<% @ Language = VBScript %>
<% Response. ContentType = 'text/vnd. wap. wml' %>
Http://www.wapforum.org/DTD/Wml_1.1.xml '>
Enter the query materials
Conclusion
Shangrao Industry and Commerce Information Network
II. information receiving page qycx. asp
The source code is as follows:
<% @ Language = VBScript %>
<% Response. ContentType = 'text/vnd. wap. wml' %>
Http://www.wapforum.org/DTD/Wml_1.1.xml '>
<%
Qycx = request. FORM ('qycx ')
Cx = 'Enterprise name like '%' & qycx & '%''
Set conn = Server. CreateObject ('adodb. connection ')
'Conn. open' dsn = qycxsjk; uid =; pwd =; database = data. mdb'
Conn. open 'driver = {microsoft access driver (*. mdb)}; dbq = '& server. mappath ('qycx. mdb ')
SQL = 'select * from info where '& cx &''
Set rs = server. createobject ('adodb. recordset ')
Rs. open SQL, conn, 1, 1
Do while not rs. eof
%>
<% Qymc = rs ('Enterprise name ')
Id = rs ('id ')
%>
'> <% Response. write qymc %>
<%
Rs. movenext
Loop
Rs. close
%>
Shangrao Industry and Commerce Information Network
<% Function uni (Chinese)
For I = 1 to Len (Chinese)
A = Mid (Chinese, I, 1)
Uni = uni & '& # x' & Hex (Ascw ())&';'
Next
End Function
%>
========================================================== ==========
Second comment: here, I am a little sweaty. at the beginning, I submitted the key word "company name". later I thought that querying the key word with ID avoided the title submitted by Chinese characters. I have been thinking about this basic title for a long time. According to hello. search for the keyword "enterprise name" submitted by asp to obtain the full name of the enterprise that contains the keyword in all the "enterprise name" fields (to avoid duplication). Make a list and click it to go to the third page, that is, the specific materials of the enterprise.
III. qycx2.asp
The source code is as follows:
<% @ Language = VBScript %>
<% Response. ContentType = 'text/vnd. wap. wml' %>
Http://www.wapforum.org/DTD/Wml_1.1.xml '>
<%
Set conn = Server. CreateObject ('adodb. connection ')
'Conn. open' dsn = qycxsjk; uid =; pwd =; database = data. mdb'
Conn. open 'driver = {microsoft access driver (*. mdb)}; dbq = '& server. mappath ('qycx. mdb ')
%>
<%
Name = request. querystring ('id ')
SQL = 'select * from info where id = '& name &''
Set rs = server. createobject ('adodb. recordset ')
Rs. open SQL, conn, 1, 1
Do while not rs. eof
%>
<% Qymc = rs ('Enterprise name') %>
Company name: <% Response. write qymc %>
<% Zs = rs ('domicile ') %>
Domicile: <% Response. write zs %>
<