ASP programming introduction (twenty): query data records of ADO components

xiaoxiao2021-03-06  38

First, understand the principle. 1. Provide input 2 for query content for query content. Submit the query information to page program processing 3. The program page main role: accept the query information, call the specific SQL query statement according to this information to obtain the query results and display. In fact, the main essence is the way of writing of SQL statements. Previously extracted "SELECT * form whattable where id =" inserted into "INSERT INTO WhatTABLE (XX_RS) VALUES ('" & content & ")" Delete "delete from whattable where id =" & id modified to "Update WhatTable set XX_RS = '"& Log_content &"' where id = "& id query" SELECT * form whattable where xx_rs like '% "& wahtkey &"%' "By an example to study 1, establish the ZIP table field ID in database zipcode.mdb , Type Auto Number (Keyword) Field PlaceName, Type Text Field, Type Text Field Zipcode, Type Text Field BOROUGH, Type Text 2 Code Borough Corresponding Area Code 3, Connection File Conn.asp

<% db_path = "zipcode.mdb" set conn = server.createObject ("adoDb.connection") connStr = "provider = microsoft.jet.Oledb.4.0; data source =" & server.mappath (db_path) conn.Open ConnStr% > 4, Query input page search.asp

[Ctrl A All Select Tips: You can modify some code first, then press Run] 5, the information query page, the same Search.asp

转载请注明原文地址:https://www.9cbs.com/read-70327.html

New Post(0)