Problems with Dreamweaver MX 2004 recordset - Help Urgent

Posted on 2005-05-01
Medium Priority
Last Modified: 2010-04-25
Hi I'm using this stored proc for a recordset in Dreamweaver MX 2004.
CREATE      procedure builder_website_list_rpr
     @rno int = Null,
     @city varchar(25) = Null,
     @company_name varchar(50) = Null,
     @trade_name varchar(50) = Null,
     @last_name varchar(30) = Null,
     @first_name varchar(20) = Null

SELECT branch.mail_addr,
       person.first_name+' '+ person.last_name as president,
       convert(varchar,builder.registration_date,102)as registration_date,
FROM branch,
WHERE ( branch.company_id = builder.company_id ) and
      ( company.company_id = builder.company_id ) and
      ( branch.branch_id = contact.branch_id ) and    
      ( contact.person_id = person.person_id ) and  
      ( trade_name.builder_reg_id =* builder.builder_reg_id ) and
      (  contact.contact_type = 'PRES' ) AND
      ( builder.builder_status = 'ACT') and
      ( @rno Is Null Or builder.builder_reg_id = @rno) And
      (@city Is Null Or branch.mail_city = @city) And
      (@company_name Is Null Or company.company_name = @company_name) And
      (@trade_name Is Null Or trade_name.trade_name = @trade_name) And
      (@last_name Is Null Or person.last_name = @last_name) And
      (@first_name Is Null Or person.first_name = @first_name)

This sp works fine in sql query analyser I can enter data into any or all variables and I get my data returned, my problem or question is when I use this stored proc in dreamweaver I can't get it to return any data.
First off I'll explain what I'm doing, very simple really. I have an ASP search form that has 6 search fields on it.
I want the user to have the ability to search on any or all of the fields in the form and if they leave them all blank they get the full list. As I'm very new to Dreamweaver I'm not sure how to use my store proc, especially when it comes to defining the variables within the advanced recordset window. This is what I have for the for the form variables. I'm unsure of what to put for the default value. If I put actual real values in for my deafualt value then thats all I get returned when I do my search. Plus if I leave the fields blank on the web form I get nothing as well.
Name                          default value      run-time value
rno                                   1                  request.form("txtRno")
city                                   1                  request.form("txtcity")
company_name                 1                  request.form("txtcname")
trade_name                      1                  request.form("txttname")
last_name                         1                 request.form("txtlname")
first_name                         1                request.form("txtfname")

Anyway I'm sure I'm close but I'm missing something, and I can't seem to get it, Please help thanks.

Question by:Duec

Author Comment

ID: 13981465
Hey are there no Dreamweaver experts out there, still looking for a bit of help if possible. Am I not providing enough information?

Accepted Solution

udayms earned 1500 total points
ID: 14025250
To get all the data when you leave the fields blank, you can probably try passing the wildcard character supported by the db as a default value (like % in the case of oracle.)...Default value is value which will be used if nowvalues are passed from the forms.

To test this, you can probably type in values from your db into default values section and test the query. If it returns data, then it means that your request.form() is not returning any values. Also, check the action method you are using in the form tag - get or post.


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question