Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Page in Ultradev

Status
Not open for further replies.

palreddy

Programmer
Jan 19, 2001
9
0
0
US
Hey Hi,
I have gotta Problem ...am building a search page..
which should search by First name,last name,middle name and
Grdauation year...sometimes some people doesnt have a middle name..even in that case i want the details to be displayed....

here is the query i have written in RecordsetQuery option iN Ultradev...

SELECT *
FROM alumni WHERE Fname LIKE 'FirstName%' AND Lname LIKE 'LastName%'AND Mname Like 'MiddleName%'

...i am not able to search...and when ever i search my database..all records are being displayed.....i mean to say my search critreia is not working...
and am dumping these first,middle and last names ito a form thru
Request.Form("Name")....i mean am dumping all of these values into fild named
Name:

my table contains fields like Fname,Mname,Lname,GradYear,Email and Major

My Resulst Page looks Like this......
------------------------------------
Name:

Garduation Year:

E-Mail address:
-------------------------------------
hoping for a urgent reply.....
sincerely,
pradeep
 
Are you using Ultradev v.4?

As I remember it has a great tutorial in which explain how to realize a simple and an advanced search page, and also related simple and advanced result pages, based on asp.

Search Page, is simple html file, it must have a form which call resultAdv.asp page passing through metod POST the parameteer submitted.

The resultadv page have a recordset defined and you also have to define local variables for all the fields retrieved from search.htm page through which you make SQL statement, for example:

you create in resultADV .asp a variable called

mail (default value) % request("e_mail"),
which is the related field name in search page form.

then in SQL

SELECT *
FROM alumni WHERE Fname LIKE 'mail'

and so goes on...

I hope i have give you some help.

Bye.

 
Hi Dinho,
Thanx for your response.I am using ultradev version 1.0.
I dont know why am unable to get my search criteria workable..i have checked with several..examples...and even the help of Ultradev..itself and followed..the steps as described in help...UD is weird and crazy...i have done a similar page..but unable to get this one...yeah i wrote the query the..way u also wrote..and even variables and default values and request.form("")are in place...where and what can go wrong...am still..wondering.....
can u think of it an dlet me know..its kinda urgent am afraid...
sincere hope...
thanx again
palreddy

 
I tried your code, and it works fine, except for null values (your middle name in this case). I found this in the access help:
"Searching for Null values or zero-length strings:
If you're using a query to search for Null values or zero-length strings, type Is Null into the Criteria cell to search for Null values, or type two double quotation marks (" ") into the Criteria cell to search for zero-length strings (don't type a space between the quotation marks)."
So, I made a query like this:
SELECT * FROM table WHERE field1 LIKE 'var1%' AND field2 LIKE 'var2%' AND field3 LIKE 'var3%' OR field3 Is NULL

Here, the key is to make the search for field3 with or without a value. Try it!.
Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top