Problems with Dreamweaver MX 2004 recordset - Help Urgent
Posted on 2005-05-01
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
person.first_name+' '+ person.last_name as president,
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.