Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Displaying Search criteria that begins with

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,59862
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Displaying Search criteria that begins with
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Displaying Search criteria that begins with - 5/6/2008 1:50:01 AM   
  mkusza1

 

Posts: 2
Score: 0
Joined: 5/6/2008
Status: offline
The problem i am having is that my search function is set to span across 4 columns and it is pulling anything that contains what is entered into the search. Ex..if i search for 90.4 it will pull anything containing 90.4  I need it to only get the records that start with what the user enters, while still searching all the columns. Here is what i have and have tried.


This code pulls anything that has what is searched for contained in either of the 4 columns.

      

This is what i tried to do, but it was unsuccessful. And gave me the proceeding error.


      

"Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done"

Not sure if it's becuase of my lack of understanding or if there is something else i am missing.

 
Thanks for the help in advance!!!
 
 
Post #: 1
 
 RE: Displaying Search criteria that begins with - 5/8/2008 3:14:33 AM   
  mkusza1

 

Posts: 2
Score: 0
Joined: 5/6/2008
Status: offline
I solved my issue. In my params i had to take out the "%" + from the beginning. Now looks like this and runs great.

[CODE]rsCatalog_cmd.Parameters.Append rsCatalog_cmd.CreateParameter("param1", 200, 1, 255, rsCatalog__varSearch + "%") ' adVarChar
rsCatalog_cmd.Parameters.Append rsCatalog_cmd.CreateParameter("param2", 200, 1, 255, rsCatalog__varSearch + "%") ' adVarChar
rsCatalog_cmd.Parameters.Append rsCatalog_cmd.CreateParameter("param3", 200, 1, 255, rsCatalog__varSearch + "%") ' adVarChar
rsCatalog_cmd.Parameters.Append rsCatalog_cmd.CreateParameter("param4", 200, 1, 255, rsCatalog__varSearch + "%") ' adVarChar[/CODE]

(in reply to mkusza1)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Displaying Search criteria that begins with Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts