SQL Server7.0 Web Data search Tips

Source: Internet
Author: User
Tags contains microsoft sql server odbc ole table name access
server|web| tips for "Data Library" search: Use the like language of SQL instructions, or Microsoft SQL Server 7.0 's Chinese full text search feature.

Microsoft Index Server
The Microsoft Index Server, included in the Windows NT Option Pack, provides a search feature for Chinese full-text checks to search the Web site for Microsoft Word or Microsoft Excel files, text, HTML, The data in the file format such as ASP.

SQL instructions like search
The search for General data library data, you can use the like language of SQL directives as follows: the SELECT * from data table name where the field name is named like '% Search ', for example: "select * from customer where address like '% Taipei% ' can To search the Customer data table, the address is in the same location with the information in Taipei. The greatest point of using the like language is that it's too slow to move because you have to do a bit of searching on the data in the library. In addition, although the memo type of data in an access repository can also be searched for, it is not possible to search for certain types of data, such as SQL Server's text-type data that cannot be searched using SQL instructions like language.

SQL Server 7.0 Full-text cable
The best way to search for data in a library is to use Microsoft SQL Server 7.0 's full Text search feature for char, Varchar, Text, NText, NChar, nvarchar type of information for the Chinese text to do the search function.
You must install the full text search portion of Microsoft SQL Server 7.0, which is not included in the general installation step of SQL Server 7.0, and must be installed in order to be able to use the search function of Chinese full-text cable. To set the steps to search the data table, first set the data sheet to be searched, method to perform [SQL Server Enterprise Manager], right-click on the data sheet to be searched, such as [Customers] on the [Northwind] library, and select [ [Define full-text indexing on a table] of full-text Index table]. The painting of [Full-text indexing Wizard] is displayed. Press [Next] to select a single position to be indexed. Press [Next] to select a single position to be indexed. Press [next] to select or generate a new catalog for storing index data. Then press the [New Schedule] button to schedule the index, and set how often the index will be indexed, [JobType] may choose [Full] or [incremental],[full] to index the entire data sheet, [incremental] It's about indexing data, such as indexing the data in the middle of the day at midnight. Press [OK] and [next] to define the data sheet to be searched.
This is not an index of the data to be searched, but must be full-text in [full Population] of [Start Population] on the catalog set in [catalogs] to index the entire data sheet, as per customer.

The above settings will be indexed every night in the data table. When data is not indexed, it is necessary to do an index the next night to search for the abnormal data, which is not immediately available.
How does the Internet search library data go through the Internet or intranet to search the data in the server's data library? On Windows NT platforms, the best option is to use the Web site of IIS (Internet information Server)
Service, the ASP (Active Server Pages) Writing program.

Let's take a look at the results of Microsoft SQL Server 7.0 's Chinese full text Search case ft1.asp, and use the browser to browse through the results of the ft1.asp, showing the records of the search. ""
SQL Server 7.0 's Chinese full-text check is very easy, as long as the SQL directive uses contains language
Law, as follows:
SELECT * from data table name where CONTAINS (name of "search")
For example: "select * from Customers where CONTAINS (address, ' Taipei City ') can be found in the Customer data table with the location of the site contains Taipei City information.

First of all, the ASP program is connected to the data library, and the ASP program that connects to the SQL Server library is as follows:
cn. Open "Driver={sql Server};D The name of the atabase= data library; server= (local); Uid=sa; Pwd= "
After you have set up the data library, the second step is to save the SQL instructions to the Recordset object RS, and to read the data in the repository from RS ("the" ""), Rs. MoveNext moves to the next record, which is made by Rs. If EOF has reached the bottom of the pen, match the Do While ... Loop to get all the records of the results. In addition to providing ODBC drivers, SQL Server 7.0 provides OLE DB provider,asp how to access SQL Server through OLE DB? ASP path through OLE DB and ODBC drivers access to SQL Server is the difference, for OLE DB to specify who provider is, that is, just add a line of "CN. Provider = "SQLOLEDB" program is OK, and the other way to access SQL Server with an ODBC driver is the same. The ASP program that connects to the SQL Server library is as follows:
cn. Provider = "SQLOLEDB"
cn. Open "server= (local); uid=sa;pwd=;d atabase= name"
Search terms can use the and, or, near, and so on. In addition to contains, you can also use the FreeText language method. For more details, please refer to the books Online of SQL Server 7.0.

From: http://program.szata.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.