navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Database Search

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Database Search
Page: [1]
 
CyberGarage

 

Posts: 39
From: Altamonte Springs, FL USA
Status: offline

 
Database Search - 3/28/2001 20:04:00   
I am trying to create a search form for a database of job postings. The problem is that I get the exact same listings and order no matter what I search for. Is there something that I overlooked? Here is the page it is on, http://www.irs-it.com/candidate.asp Any help would be greatly appreciated.

Mark

Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Database Search - 3/28/2001 19:15:00   
What SQL string have you used?

(in reply to CyberGarage)
CyberGarage

 

Posts: 39
From: Altamonte Springs, FL USA
Status: offline

 
RE: Database Search - 3/28/2001 22:15:00   
Spooky,

Very new to this and not sure. I am using MS Access for the database. Does this help any.

Mark


(in reply to CyberGarage)
Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: Database Search - 3/28/2001 22:41:00   
How did you connect to your Access database. Did you use FrontPage's DRW?

If you open your database access (not Access) page in FrontPage and click on the HTML tab at the bottom you will see a page with code in it.

Scroll down until you come to some red code. One of the lines will start with this:

fp_sQry="SELECT * FROM ... at least it will start with fp_sQry=

What Spooky the Great is asking is for that sentence starting with fp_sQry=

Hope this helps,

Joe


(in reply to CyberGarage)
CyberGarage

 

Posts: 39
From: Altamonte Springs, FL USA
Status: offline

 
RE: Database Search - 3/28/2001 22:54:00   
Joe,

Thanks for the help. The line is below.

fp_sQry="SELECT * FROM jobs WHERE (Title LIKE '%::Title::%' OR Location LIKE '%::Location::%' OR Pay_Rate = '::Pay_Rate::' OR Required_Skills LIKE '%::Required_Skills::%') ORDER BY Title ASC,Location ASC"


Does this help Spooky?

Thanks,
Mark


(in reply to CyberGarage)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Database Search - 3/29/2001 20:12:00   
I'm not sure, but I think the prob is in your logic - lots of OR's. Maybe you should be throwing in a few AND's to restrict your critera a little. IMO, it get's a little sticky if you're trying to use a search form with multiple input fields and you want to leave a lot of "wild cards" for the user. What I have done with limited success is to put multiple forms on the same page: one search for UserID, one search for email address, etc.

If you want to do it all on the same form, the DRW may not be for you - you may have to custom SQL it. However, I'm sure there are many here who could probably answer better.


(in reply to CyberGarage)
Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: Database Search - 3/29/2001 20:31:00   
Do you have any default values for your fields? That could be the problem. If not, pick something crazy that would never come up in a search.

Joe


(in reply to CyberGarage)
CyberGarage

 

Posts: 39
From: Altamonte Springs, FL USA
Status: offline

 
RE: Database Search - 3/29/2001 21:43:00   
Thanks Guys,

I took all but one input out of the search and it works now. Joe, you mentioned putting multiple searches on one page, how would I go about doing that? Would I have to have more than one list of results on the page? Can I have the results of a search come up on a different page? The main page with the search has a lot of text and when the page refreshes with the result it starts back at the top of the page. I don't want the visitors to have to scroll down to see the results. Everyone has been a great help and I would appreciate any more assistance you might have.

Thanks,
Mark


(in reply to CyberGarage)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Database Search - 3/30/2001 20:13:00   
A good way to do it, is place your results on a different page from your search form.

http://www.frontpagewebmaster.com/ubb/Forum6/HTML/001626.html


(in reply to CyberGarage)
CyberGarage

 

Posts: 39
From: Altamonte Springs, FL USA
Status: offline

 
RE: Database Search - 3/30/2001 20:39:00   
Thanks everyone. I was trying what you guys mentioned to do to add multiple search criteria and all of the sudden its stopped working. I went back to how I had it working with the single input that was working and still nothing. This is the error that I am getting.

Database Results Error
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x6e0 Thread 0xc58 DBC 0x24e1024 Jet'.

Does anyone know if this is a server problem or something I am doing wrong? The page is http://www.irs-it.com/candidate.asp

Thanks again for any help you can give.

Mark


(in reply to CyberGarage)
Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: Database Search - 3/30/2001 21:51:00   
Mark,

I don't know what is going on with your error. Your SQL query looks fine to me. I have had many fields being submitted to the DB with no problems. I would guess that you did not have default values designated for your fields.

What this means is for example you have 3 fields; T1, T2 and T3. If you gave each a default value (it is an option using the DRW) of say "qrzx34yutp", when you made a search and T1 was the field you filled out. T2 and T3 would have an unseen value of "qrzx34yutp" being submitted at the same time.

If T1 was a positive search, you would only return those results because T2 and T3 would turn up negative (provided the Database fields that T2 and T3 are searching do not contain "qrzx34yutp").

If T1 is negative for your search you will get No records returned because T2 and T3 should also be negative.

Spooky gave you a great suggestion of splitting your search form apart from the DRW. If he does not have an answer for your database error and your host claims it is not their problem... I would just rebuild the DRW and include default values.

Backup as much as possible.

Joe


(in reply to CyberGarage)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Database Search - 3/30/2001 23:30:00   
Normally you will find that the host has caused this problem, but Access can be as much at fault. Its not a great web database.

Note the error? Microsoft Access Driver]General error Unable to open registry key

Its a server side registry problem associated with the Access driver.


(in reply to CyberGarage)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Database Search
Page: [1]
Jump to: 1





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