search functionality not working

search functionality not working

  
Hi All,

I have a Testwebscreen_List screen where i have search input widget and search,reset buttons.I am assigning the search value entered in input widget to a session variable of type text and calling an stored procedure by using Advanced Query.Based on fileterd value entered in input search widget I am getting the result set and able to show it in RecordList in output screen.But problem is when i search with a  text that has an single empty space in search keyword (Ex:Server Connectivity) then i am getting an error shown below.I have verified the stored procedure by executing in my database and it is working fine with searchinput that has single empty space in between the searchinput.

Error in advanced query TestSP  in Preparation in Testwebscreen_List in MainFlow in [dbo].[usp_TestSP_SearchParam] @SearchParam): Incorrect syntax near 'Connectivity'

Thanks,
Prashanth
please provide an oml.
what database are you using?
how does the adv. query looks like
how are the input parameters defined?
Statler & Waldorf wrote:
please provide an oml.
what database are you using?
how does the adv. query looks like
how are the input parameters defined?
 Hi,
The database is:SQLServer 2008.For more details please find the attached doc.Waiting for your help.

Thanks,
Prashanth 
 
erm, should you not enclose the parameter with single-quotes? thus something like EXEC spName '@parameter'
if you have a space with quotes, sql-server prolly thinks you got 2 parameters provided and then it goes *poof* because your SP only has 1 parameter
Statler & Waldorf wrote:
erm, should you not enclose the parameter with single-quotes? thus something like EXEC spName '@parameter'
if you have a space with quotes, sql-server prolly thinks you got 2 parameters provided and then it goes *poof* because your SP only has 1 parameter
 Hi,

You mean i need to enclose the searchparameter in single quote like this: EXEC spName '@Searchparameter' in advanced query?

I tried above syntax but it is not working.If i enclose the searchparameter in single quote i am not able to see anything in output screen.So what i did is for SearchParamter we have property called :ExpandInline.By default its value is Yes.I set it to No then everything is working fine now without enclosing the @SearchParameter in single quote.Please correct me if my understanding is wrong.

Thanks
Prashanth



 
All I was trying to say was that if you don't enclose it with quotes the sql might think of it as 2 parameters or some weird behaviour.

http://www.outsystems.com/help/servicestudio/7.0/default.htm#Using_Data/Advanced_Query_Parameter_Properties.htm