1 / 7

Chapter 7 Searching Your Products

Chapter 7 Searching Your Products. Objectives: Use of GetRows() method. Use of Like Operator with SQL Select statement. Optimizing Search Page. Creating Indexable Web Pages. GetRows Method.

Télécharger la présentation

Chapter 7 Searching Your Products

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7Searching Your Products • Objectives: • Use of GetRows() method. • Use of Like Operator with SQL Select statement. • Optimizing Search Page. • Creating Indexable Web Pages.

  2. GetRows Method • The GetRows() method copies the contents of a Recordset into two dimensional array. The first index of the array represents the table column. The second index of the array represents the table row.

  3. SQL Like Operator • The SQL like operator helps in using wildcard character. • % - Place holder that represents one/more characters. • _ -Place holder that represents one character. • Select * from products where p_name Like ‘%c’

  4. Optimizing Search Page • Using Like operator to search terms is hard on database. • Microsoft has two products that you can use to add a more scalable search page to your web site. • Index server – To Search through static files. • Ms Full-text Search Service- to perform database search. It is included with MS SQL server.

  5. Creating Index Web pages • Getting Web pages into internet search engine is extremely important to attract customer. • Inter search engine have problems with indexing pages generated from a database. • To get around this problem the trick is to convince the search engine that it is getting a static page when , in fact, it is retrieving a page generated from the database. • One easy way to do this is to take advantage of the Customer Errors Feature of IIS.

  6. We need to create a special directory named product. Follow these steps: • Create a new directory on your computer’s hard drive named Products as a subdirectory of your Web site’s root directory. • Next, launch the Internet Service Manager and open the property sheet for this directory by right-clicking the products folder and selecting properties. • Choose the tab labeled Customer Errors. • We are going to create a customer error for error 404 File Not Found. Click the button labeled Edit Properties after selecting this error.

  7. For Message Type, select URL. In the text box labeled URL, enter / product.asp. These entries will redirect to the ASP page named Product.asp when a file is not found in the products directory. • Click OK to save all your changes. • After you have completed the steps above, any ime someone requests a page from the Product directory, he will be redirected automatically to the Products.asp page. • Add the code 7.5 in text book. • When you request page from the products directory, you are automatically redirected to the Product.asp page. • The script retrives

More Related