Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2004, 08:14 PM
Authorized User
 
Join Date: Apr 2004
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default does any one Help me !

First forgive me about my english ! I'm Vietnamse
I have two page in my site. The first page is

<Form action="SearchResult.Asp" method="GET">
  <input type="Text" name="txtValue">
  <Input type="Submit" Value="Search" name="cmdSearch">
</Form>

The second page is:SearchResult.Asp

Set Cn=Server.createObject("ADODB.Connection")
    Set Rs=Server.CreatOject("ADODB.Recordset")

   Cn.Open ("DSN=mydatabase")
   Dim Value
       Value=Request.Querystring("txtValue")
      Rs.Open "Select * from myTable where myFilde = '"& Value&"'",1,2

I want the Pagesize in the second page but i get the following error
The Recordset object is Either .BOE or EOF

What do I have to do to fixed this problem and where the code is ?
Thank for your help !




 
Old April 24th, 2004, 08:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I think you got to change you select statement. This wont be giving you any result, when you search for "test" where the word "test" is present somewhere within the field value. So change it as follows.

Select * from myTable where myFilde like '%"& Value & "%'"

This should work.

Cheers!

-Vijay G









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.