DataSource Controls :: Full Text Search Test - Works Without Parameters
May 28, 2010
I'm new with all stored procs - but I have a very basic Full Text Search going on...I created a stored proc, and linked it up to my application using Linq to SQL. If I use Linq to SQL to call the stored proc without any parameters (hard coded search string) i get results back, as soon as I add a parameter - the result set is 0 for some reason.
The funny thing is that I run Profiler and execute both queries its trying to do - and it looks identical
Here is the working parameterless query:
[Code]....
and according to Profile this is what it looks like when its called as a stored proc
[Code]....
I get 2 results as expected.
Here is the NON-working stored proc that takes in 1 string parameter
[Code]....
and here is the query that gets called when profiling
[Code]....
declare @p4 int
View 3 Replies
Similar Messages:
Feb 13, 2010
How i can make the normal search string to sql server full text search parse, because when we are user enyer search text "how to run windows schedule in C#", in database we have article to to this, but data not returning and sometime is say error in key word and etc.
View 1 Replies
Jan 27, 2010
I want a word search i doing the search like this , but it is giving character wherever there is in the string,if i give two character like ok it is searching for a full string where ever Ok is there select * from table1 where textfield like '%word%' this query would match word but also wordabc how can i make it aware of delimitions
View 3 Replies
Mar 29, 2010
I am using SQL Server 2008 and Full Text search.
Its working fine for PDF / doc files but not working for .JPG files.
Basically i have some document scanned and stored it in varbinnary datatype in DB.
I am able to search for .doc /.xml /.pdf files .. but not able to search .jpg.
also i am not getting ".jgp" extension in result of following query
SELECT document_type, version, manufacturer
FROM sys.fulltext_document_types order by document_type
View 1 Replies
Feb 7, 2010
I have a website which uses full text search. It was working fine on my web host. LAst month, I changed hosting to godaddy.com. They dont support full text search and now my website is not working properly. what change should i make in my stored procedures that they work same as they work with full text. what is alternative to full text search. I tried using LIKE but it doesnt work same way.
View 1 Replies
Jul 2, 2010
I am actually using 2 type of queries in my website e.g
These Queries are from my stored procedures
SELECT * FROM TblName WHERE FREETEXT(ColumnName, @parameter)
AND
SELECT * FROM TblName WHERE CONTAINS((Column1, Column2), @parameter))
I have enabled Full Text Indexing on my tables both local and on my hosting company MS SQL Server.
The above queries are working fine on my local database and return results but these queries return nothing when i try to run them on hosting company MS SQL Server.
I have identical data on both MS SQL Servers and both servers are 2008.
View 2 Replies
Mar 30, 2010
I have installed sql server 2008 express along with visual web developer 2008 express (latest sp1) using web installer now I downloaded this file:
'Microsoft® SQL Server® 2008 Express with Advanced Services' from here: [URL] but when I run the installer and choose add new features to existing instance of sql server I get no full text search feature option in the list, There are only a few options that are selected and greyed out (because they are installed previously) in the list of available features. Why I don't have full text search feature in the list and how to find and install it? (mine is the 64bit version)
View 2 Replies
Jan 12, 2011
I am having with the a full text index I am developing for a product catalog. It does all work to a degree I am just seeing some strange things happening.
From the database side I have a Products table that is being indexed on both the PartNumber and Description columns because I would like the users to be able to search either or using the search function.
Problem 1:
whenever I use multiple words in the search I don't always get the results I am looking for, this happens most notably when I am attempting to say put in a full part number (which for in this case would look like "I 10-9.2")
Problem 2:
I am not 100% sure that this is the most efficient way of completing what I am attempting to accomplish here since I have 2 columns that I need to perform the search on
Here is an excerpt from the click even when the user clicks the search button on the page:
[Code]....
And here is the search functions called from the click event to firstly check if there are any results and the second to display the results in a custom gridview:
[Code]....
View 1 Replies
May 9, 2010
I'm implementing an AJAX autocomplete feature where the user types into a textbox and the webpage generates suggestions (pretty much like how Google's search box works). I got the AJAX part to work right, but for some reason, my database query does not.Let's say I want to find "Chicago". Using the following query does not find it.SELECT TOP 10 citynames FROM city WHERE CONTAINS(citynames, 'chi*')But using this query does.SELECT TOP 10 citynames FROM city WHERE CONTAINS(citynames, 'chicago')By the way, "citynames" is an ntext type field and I'm using SQL SERVER 2008.Does anyone know why my first query can't find "Chicago"? I've been staring at that query for hours, yet can't find anything wrong with it. Something wrong with the database maybe?
View 2 Replies
May 19, 2010
I am working on a website hosted with GoDaddy, SQL Server 2005. I have a table in my SQL Server database with a full-text index. On my website, a user can type in search terms and the terms are then passed to a stored procedure in the database which performs the search. The first search takes about 45 seconds to get results. Subsequent searches return results immediately. I found a description of this problem in a Microsoft knowledgebase article:http://support.microsoft.com/kb/915850/en-usGoDaddy tech support says I need to purchase a dedicated server to make the changes suggested in this article.Surely there is some other solution. Does anyone know how to avoid this delay without changing the server configuration?
View 1 Replies
Nov 26, 2010
how to do a search using a Full Text Search Catalog. I would also like to have the results on the page highlighted?
View 1 Replies
Sep 7, 2010
I tried Restart the service I tried restart the server But the number of row affected is still zero :(
View 2 Replies
Feb 28, 2010
I'm developing an ASP.NET application which has allows users to search for other users based on their name. This search is done using Linq to SQL. At the moment, I've only got 10 or so users in my database, so I can't really test the efficiency of my search query. I'm new to testing and such, but what is the best way to simulate 100/1000/10000 users on a query? Is there a tool (preferably free) that would allow me to perform tests to see how quickly the database can be searched if it had x number of users?
View 1 Replies
Feb 13, 2010
i know how do the paging with normal return query using row number in sql server, but i'm looking how to do the paging , sql server full text search returning result.
Can i use the same row number function or any good perfomance way?
whcih sql server full text search(FREETEXT,CONTAINS and etc) is best article site?
View 3 Replies
Jan 10, 2011
I have a few columns in the table. (E.g. Name, ID, Phone, Address, Father name) and I have a text box where user can type in and the system will show match result on the page. User will only key in Name and Father name in the text box. I do not want to implement a full text search or indexing.
View 4 Replies
Oct 10, 2010
I've got a gridview that I need to perform filters on. All works great until I try and add a date range..
Below is the code. Basically I have 5 dropdown lists which all filter as expected giving them the option to use each one or just the ones they need.
The problem is they want to also have the option of filtering by date i.e date range or greater than or less than or equal to etc..
As soon as I add the date parameter it stops the other filters working. I'm guessing because I have a null value in the date field (textbox) if they dont use the option??
Does anyone have a sample on how to filter by dropdown lists and dates keeping in mind they wont use all the filter options?
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.style2
{
width: 100%;
}
.style3
{
width: 137px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
</br>
<table>
<tr>
<td>
Person Responsible</td>
<td>
<asp:DropDownList ID="DDLPersonResponsible" runat="server"
DataSourceID="SqlDataSource2" DataTextField="AssignedTo"
DataValueField="AssignedTo" AppendDataBoundItems="True"
AutoPostBack="True" Height="22px" Width="200px">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Location</td>
<td>
<asp:DropDownList ID="DDlLocation" runat="server" Height="22px" Width="200px"
DataSourceID="SqlDataSource3" DataTextField="location"
DataValueField="location" AppendDataBoundItems="True"
AutoPostBack="True">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
SelectCommand="usp_Locations" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
Activity/Product/Service</td>
<td>
<asp:DropDownList ID="DDlActivity" runat="server" DataSourceID="SqlDataSource4"
DataTextField="Activity" AppendDataBoundItems="True"
AutoPostBack="True" Height="22px" Width="200px">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
SelectCommand="usp_Activity" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
Risk Ranking</td>
<td>
<asp:DropDownList ID="DDlRiskRanking" runat="server" AppendDataBoundItems="True"
AutoPostBack="True" >
<asp:ListItem Value="%">All</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Reference</td>
<td>
<asp:DropDownList ID="DDLReference" runat="server" DataSourceID="SqlDataSource5"
DataTextField="Reference" AppendDataBoundItems="True"
AutoPostBack="True" Height="22px" Width="200px">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
SelectCommand="usp_SelectReference" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
Target Date</td>
<td style="margin-left: 40px">Greater than
<asp:TextBox ID="txtstartTargetDate" runat="server" AutoPostBack="True"></asp:TextBox> Less Than
<asp:TextBox ID="txtendTargetDate" runat="server" AutoPostBack="True"></asp:TextBox>
</td>
</tr>
</table>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
SelectCommand="usp_AssignOwner" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<br />
<asp:GridView ID="GridView1" runat="server" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="IssueId"
DataSourceID="SqlDataSource1" Width="803px" CellPadding="4"
ForeColor="#333333"
EmptyDataText="There are no matching records to display.">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="IssueId" HeaderText="IssueId" InsertVisible="False"
ReadOnly="True" SortExpression="IssueId" />
<asp:BoundField DataField="BriefDescription" HeaderText="BriefDescription"
SortExpression="BriefDescription" />
<asp:BoundField DataField="DateEntered" HeaderText="DateEntered"
SortExpression="DateEntered" />
<asp:BoundField DataField="EnteredBy" HeaderText="EnteredBy"
SortExpression="EnteredBy" />
<asp:BoundField DataField="Likelihood" HeaderText="Likelihood"
SortExpression="Likelihood" />
<asp:BoundField DataField="Consequence" HeaderText="Consequence"
SortExpression="Consequence" />
<asp:BoundField DataField="Location" HeaderText="Location"
SortExpression="Location" />
<asp:BoundField DataField="Activity" HeaderText="ActivityProductService"
SortExpression="Activity" />
<asp:BoundField DataField="Scope" HeaderText="Scope"
SortExpression="Scope" />
<asp:BoundField DataField="Aspect"
HeaderText="Aspect" SortExpression="Aspect" />
<asp:BoundField DataField="AspectRevised" HeaderText="AspectRevised"
SortExpression="AspectRevised" />
<asp:BoundField DataField="Impact" HeaderText="Impact"
SortExpression="Impact" />
<asp:BoundField DataField="Objective" HeaderText="Objective"
SortExpression="Objective" />
<asp:BoundField DataField="KeyAction" HeaderText="KeyAction"
SortExpression="KeyAction" />
<asp:BoundField DataField="TargetDate" HeaderText="TargetDate"
SortExpression="TargetDate" />
<asp:BoundField DataField="PersonResponsible" HeaderText="PersonResponsible"
SortExpression="PersonResponsible" />
<asp:BoundField DataField="PercentageCompleted"
HeaderText="PercentageCompleted" SortExpression="PercentageCompleted" />
<asp:BoundField DataField="Reference" HeaderText="Reference"
SortExpression="Reference" />
<asp:BoundField DataField="Comments" HeaderText="Comments"
SortExpression="Comments" />
<asp:BoundField DataField="Status" HeaderText="Status"
SortExpression="Status" />
<asp:BoundField DataField="AssignedTo" HeaderText="AssignedTo"
SortExpression="AssignedTo" />
<asp:BoundField DataField="RiskRanking" HeaderText="Risk Ranking" />
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
SelectCommand="usp_AllIssues" SelectCommandType="StoredProcedure" FilterExpression="assignedto like '{0}' and location like '{1}' and activity like '{2}' and riskranking like '{3}' and reference like '{4}' and targetdate > '{5}'">
<FilterParameters>
<asp:ControlParameter Name="assignedto" ControlID="ddlpersonresponsible"
PropertyName="SelectedValue" />
<asp:ControlParameter Name="location" ControlID="ddllocation"
PropertyName="SelectedValue" />
<asp:ControlParameter Name="activity" ControlID="ddlactivity"
PropertyName="SelectedValue" />
<asp:ControlParameter Name="riskranking" ControlID="ddlriskranking"
PropertyName="SelectedValue" />
<asp:ControlParameter Name="Reference" ControlID="ddlreference"
PropertyName="SelectedValue" />
<asp:ControlParameter Name="startdate" ControlID="txtStartTargetDate"
PropertyName="text" />
</FilterParameters>
</asp:SqlDataSource>
</asp:Content>
View 2 Replies
Feb 3, 2011
I want to implement full text search in C# using linq.
View 1 Replies
Feb 4, 2011
I want to implement full text search using Entity framework in C# 2010. Is there any way to implement this ? I have searched a lot but unable to find the solution.
View 5 Replies
Mar 14, 2011
I am using the following code for full text search
[Code]....
but I got the following error:
[Code]....
so what is wrong with me?
View 7 Replies
Aug 27, 2010
I have created procedure for full-text search and it works in SQL Management Studio 2008 (SQL Server 2008 Express) but in Visual Studio 2010 not - I have error:Full-Text Search is not installed, or a full-text component cannot be loaded.I have read somewhere that only admin can use full-text indexes - so how I can use full-text search in VS2010 ?
View 2 Replies
Nov 23, 2010
I am creating a web app to search thousands of records for past 60 days. I am using SQL stored proc to do the full text search and return the results order by RANK and insert datetime.
I am using custom paging in stored proc to receive 10 results at a time. Each time a page of 10 record is returned it comes up with few records that were added recently and others which were added 40,50 or 60 days ago. This happens because full text search find those results more relevant than the recently added ones.
What would be the best way to sort the results by rank as well as by date time. I am using SQL Server 2008.
View 2 Replies
Mar 26, 2011
i have in my asp.net page a textarea where users type an article="long text" to be saved in the database. In another page i display these articles(textarea) in a :
<p class="p-article">
the text of the article goes here.
</p>
I'd like to filter these articles by search keywords .for example when a user search for "Startup Marketing".
I want to apply the keywords as a filter and get articles and bring those that contain "Startup" or "Marketing" or "Startup Marketinbg".And this in client side by jquery if possible.
View 1 Replies
Jun 13, 2010
i have made fulltext index in 4 columns in a table ( 2 ARABIC columns (title,Desc(html) AND ENGLISH(title,Desc(html))it works fine locally when i use contains function in search but in sever arabic search doesnt work well .
View 2 Replies
Feb 16, 2010
I am using ContainsTable() to perform a full text search on a field (of type varbinary()) and am I wondering if there is a good way to return an excerpt of text around at least one location where the keyword matched the text in the field.Example:User searches for "computer science".The following sentence exists in the varbinary() field: "This book is about computer science and other IT related fields."I would like to return an excerpt around the words "computer science", something like: "...book is aboutcomputer science and other IT..."
View 1 Replies
Aug 17, 2010
I´m currently programming a web search application in ASP.Net and having problem with full text searching. My requirements are:
1. Save a byte array from SQL server to word document as a temp file in a server side?
2. How to highlight the string I am currently searching in the Word document and return to the user the sentence with the highlighted string (like on Bing or any other search engines)? Is it possible to fullfill this requirement with full-text search integrated in SQL Server 2008?
View 1 Replies