close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DataAssist Results Issue (when live)

Thread began 6/21/2010 2:23 pm by braduhl | Last modified 7/12/2010 1:29 pm by Jason Byrnes | 2441 views | 17 replies |

braduhl

DataAssist Results Issue (when live)

DataAssist 2.0.7
Dreamweaver CS4
Windows 7

I'm hoping someone can help me with this issue:

I have a search form and results page that works perfectly when testing locally. The results page contains two recordsets, one for our glassware search, and one for our awards (we precision carve glassware & crystal products).

Once posted to the webserver, the Keyword/part number search does not work, but the price range does.

For the life of me, I do not understand why it works locally flawlessly, but does not work when posted live.

I have attached the search form page, the search results page, and the DataAssist HelperJS.asp file. Please let me know if there is anything else you may need.

Thanks in advance for your help.

Brad Uhl
Crystal Carvers Inc.
1-800-365-9782

Attached Files
CCI-DataAssist.zip
Sign in to reply to this post

CraigRBeta Tester

when you say it does not work, do you get any error messages, or does it just not return the results you expect ?

do you have a link to the live page ?

Sign in to reply to this post

braduhl

It just does not return results when it should. As mentioned, locally it works perfectly when tested.

The site is live at www.crystalcarversinc.com. Click on the Search button and type in a keyword (like mug, or wine). It is if it is not passing any information to filter the recordset.

If you put in a price range, it works just as it should.

Please let me know if you have any other questions...

Thanks for your help!!!

Brad
Crystal Carvers Inc.
1-800-365-9782

Sign in to reply to this post

CraigRBeta Tester

I can confirm that I get the same problem from your link.

The search parameter is being passed into the query, but there appears to be no matching data.
(if the parameter wasn't being passed, the query would return all rows)

One thing that springs to mind.
If you are running on a linux host, ensure that the 'case' of the field doing the filtering is correct.

I know that windows is not case sensitive, but linux is, (which may be one reason why it works on your local machine).

if this doesn't help, you could try echoing the sql statement to the page so you can see it, which may help identify the problem

(sorry, just realised you are using asp not php, you would use Response.Write to display the sql rather than echo).

Sign in to reply to this post

braduhl

Hi Craig,

Just wanted to let you know that when trying out a different webhost, the search worked just fine. Unfortunately, the webhost I have decided to go with, we're back to the same problem.

Even though I am currently in school to continue my web design education, I am still learning. How should I be using Response.Write to display the SQL information to the screen? Where is the best place for the code?

Thanks again for your help...

Brad

Sign in to reply to this post

CraigRBeta Tester

Hi Brad.

It is strange that the same site works fine with a different hosting provider, suggesting that there is nothing wrong with the code - per se.

I am a bit rusty with asp, but essentially, the response.write instruction was posted so you could view the sql on the page after it was created.

(i can't test for this, so i hope its ok), below line 82, try, for example... response.Write(rsCatSearchGW_cmd.CommandText)

on your page, any time after DataAssist has created the sql the code, you can write the code to the page using this method

as a debugging method, i occasionally do this, then take the sql statement and pass it into my database manually to check for any errors.

Perhaps someone from Webassist can help a bit more ?

Hope you don't mind me suggesting, on another subject, i notice your site is frame based.
I would urge you to move away from this if you want the site to be found by search engines

Sign in to reply to this post

braduhl

Hi Craig,

Thanks for the information, I wil give that a try and let you know the outcome.

As far as my Frame-based site, I completely agree. I am currently in the process of learning CSS and will be doing some re-design as soon as possible. I at least wanted to get what I had worked on (for about two years) out there to our customers in the meantime.

I appreciate your recommendation and agree that I need to get rid of the old way of doing things :-).

Thanks again for your help...

Brad

Sign in to reply to this post

braduhl

Hi Craig,

I placed "response.Write(rsCatSearchGW_cmd.CommandText)" after Line 82, which caused the infamous Red Exclamation Point beside any dynamic text referrencing the recordset, but still displayed the information that we were after on the results page.


SELECT * FROM qry_Products WHERE ProductTypeName = 'Glassware' AND ProductDisc = 0 ORDER BY ProductID


I'm still trying to figure out how the information from the search page (keyword, part no., etc.) becomes part of the SQL Statement for filtering on the results page? It's a little confusing to me.

I'm used to passing a variable from the previous page to the recordset for the filtering criteria, but there are no variables defined in the recordset to 'grab'. Can someone explain this to me?

Thanks once again.

Brad

Sign in to reply to this post

Jason ByrnesWebAssist

the way data assist search works is to dynamicly create the where cluase to filter the recordset, and append it to the recordset select statement before it is executed.


One strange anomaly I see in the code, is that the price form elements are being referanced using the generic Request collection, but the keyword element is being referanced using the Request.Form collection. For example, line 16 - 18:

WADbSearch1.keywordComparison(KeyArr0,"" + String(Request.Form("tfKeyword")) + "","AND","Includes",",%20","%20","%22","%22",0);
WADbSearch1.addComparison("ProductRetPrice","" + String(WADS_stripCurrency(Request("tfMinPrice"))) + "","AND",">=",1);
WADbSearch1.addComparison("ProductRetPrice","" + String(WADS_stripCurrency(Request("tfMaxPrice"))) + "","AND","<=",1);




try changing line 16 to:

WADbSearch1.keywordComparison(KeyArr0,"" + String(Request("tfKeyword")) + "","AND","Includes",",%20","%20","%22","%22",0);




if that does the trick, you'll also want to change line 52:

WADbSearch1.keywordComparison(KeyArr0,"" + String(Request.Form("tfKeyword")) + "","","Includes",",%20","%20","%22","%22",0);




to:

WADbSearch1.keywordComparison(KeyArr0,"" + String(Request("tfKeyword")) + "","","Includes",",%20","%20","%22","%22",0);
Sign in to reply to this post

braduhl

Hi Jason,

Hope all is well & thanks for your assistance - it's been a while :-).

I made the revisions per your post, still to no avail.

The search feature still works perfectly when tested locally, just not when live. It acts as if there is nothing that matches the criteria.

Any other thoughts?

Thanks!

Brad
Crystal Carvers Inc.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...