SQL Server :: Search A Text In The Database Even If User Writes Wrong Spelling?
Dec 11, 2010
i want to search a text in the database even if user writes wrong spelling.
I am using LIKE operator. But I am not getting exact result.
For example: I want to search 'Norrebro' if user types 'Norebro' (wrong spelling)
LIKE operator does not work in this case. So how can I get the exact result??
View 1 Replies
Similar Messages:
Sep 16, 2010
How to search a word for spelling correction in c#. Below is the code which i used,
Its not working, for words less than three 5 letters.
public string _dictionary(string word)
{
string[] wordArray = new string[125896];
string reading;
int nwords = 0;
FileStream fs = new FileStream(@"C:Documents and Settingsharsha.limayeDesktopspelling.txt", FileMode.Open, FileAccess.Read);
StreamReader s = new StreamReader(fs);
while((reading=s.ReadLine())!=null)
{
if (reading == word)
return word;
char[] TextboxPos=reading.ToLower().ToCharArray();
char[] readingPos = new char[20];
readingPos = TextBox1.Text.ToLower().ToCharArray();
if (TextboxPos[0] == readingPos[0])
{
if(readingPos.Length<=5)
{
if (TextboxPos[1] == readingPos[1] && TextboxPos.Length-1 == readingPos.Length-1)//[readingPos.Length])// && TextboxPos[TextboxPos.Length-1] == readingPos[readingPos.Length - 1])
{
// return reading;
TextBox1.Text = "Search for " + reading + " instead of " + TextBox1.Text;
break;
}
}
else
{
if (TextboxPos[1] == readingPos[1]&& TextboxPos[2] == readingPos[2] && TextboxPos.Length == readingPos.Length && TextboxPos.Length-1 == readingPos.Length - 1&& TextboxPos.Length-2 == readingPos.Length - 2)
{
//return reading;
TextBox1.Text = "Search for" + reading + "instead of" + TextBox1.Text;
break;
}
}
}
wordArray[nwords] = reading;
nwords++;
}
fs.Close();
s.Close();
return reading;
View 1 Replies
Sep 14, 2010
i want implement spelling checker to check the spelling written in textbox is correct or not in c#.
i have a text file from where the soelling has been checked.
View 2 Replies
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
Aug 1, 2010
I have a weird thing happening. I have two identical databases installed on one virtual machine but under two different instances of SQLServer. For some reason, periodically when saving from one it will save to the other instead. Using debug, I have verified that the connection string is correct and when the item saves, it still saves to the wrong database.I use session variable, and am of the belief that it might have something to do with it...and t hat when I go from one to the other it is still getting the connection string form the other for some reason.To make sure that it isn't a problem, I make sure that I completely close out one database before opening the other in a new IE window.I assume that when I completely close out an internet explorer window that it abandons all session states. Is that true?
View 7 Replies
Feb 4, 2010
i have one multi line text box in my asp page.
while entering content to it , i want to high light the word by red underline if the spelling of word is not correct (just like in word)
i have to do it without using any button , instead while changing text.
View 5 Replies
Sep 14, 2010
how i check the spelling written in text box is correct or not. in c# i am using a file which contains some words. and this file is used to check the spelling written in text box.
View 3 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
Aug 1, 2010
I have a very weird thing happening. I have two databases that have exactly the same tables but different database names on the same virtual machine, but in different instances of SQL Server. For some reason, when using one of them, it will save to the other. In debug, looking at my connection string..I have verified that it is correct, yet when I allow the save, I look in the table and it isn't there, it is in the other database that is in a table with a completely different name and in a different instance of SQL Server.
View 1 Replies
Feb 28, 2011
I've got a web app that uses a MS SQL Server 2008 database. Recently I made two copies of the database, one for ongoing development, the other for users to begin testing and evaluting the application.
I've got two seperate web applications now. I've changed the web.config of the 'test' version to point to the test DB, but it still seems to be using the previous version.
Is this cached somewhere? I've run IISRESET on the box, but the the 'test' version of my web app still seems to point to the wrong DB.
View 3 Replies
Dec 15, 2010
i am working in the vb.net and inserting the date into DATETIME field sql db. During duging am checking it shows correct date but when insert into db it show "1/1/1900 00:00:00" . I dont know whats the problem. Code:
Dim ObjDob As DateTime = CDate(Me.ddlDates.SelectedValue & "/" & Me.ddlMonths.SelectedValue & "/" & Me.ddlYears.SelectedValue).ToString("dd/MM/yyyy")
View 6 Replies
Sep 8, 2010
I'm stumped. I have a client site on a virtual private server - Windows Web Server 2008 SP2, IIS7, SQL Server 2008 Express.I'm trying to setup a second web application, to allow him to review updates prior to their going live. I've created the web application in IIS7, and I have added a second database to SQL Server. The second db is essentially a copy of the production db, with 'DEV' prefixed to the database name and a few new fields in a few tables.My production site works fine. However, the test site comes back with an SqlException: "Invalid column name 'version'." This is one of the new fields - which leads me to believe that my dev site is referring to the production database, and not the dev database. Connection strings, however, do point to different databases (although the login is the same for both):
[code]...
View 1 Replies
Feb 10, 2010
I'm building a small website using ASP.net/C# and I wanted to know how to implement a simple search feature using a text box and a dropdown.
The datasource is a products table and in the text box I enter the product's name and in the dropdown are the categories. (I have managed to populate the dropdown with the available categories already)
It must follow these conditions:
If both text box and dropdown are blank all products must be listed;
If a category is chosen all products from that category must be listed;
If only text is filled, all products that match are shown;
View 2 Replies
Sep 28, 2010
in my project i would like to save pdf files in database, how to save pdf files in database ? along with that i would like to create create a search page to search for pdf files with PDF file names , how to accoplish these things
View 3 Replies
Sep 8, 2010
i have a textbox with button search.
i would like to search database of input text from textbox and give result out in one view.
View 2 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
Mar 23, 2013
I need a query to fetch records from data from database based on partial text entered in textbox like search data from College table based on College Name entered in text box. I want that all record containing that College name displayed in grid view.
View 1 Replies
Aug 12, 2010
I'd like to search for a particular table/Clolumn name that was used in all those Stored procedure.
Is there a query by which I can search the table/Column in SPs? Kindly let me know.
Some thing like, Select * from [Stored procedure] where Table/Column name like '%Test%'
View 3 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
Feb 21, 2011
I am working in a school and we recently installed a new server running WinServer 2008R2. I want to be able to point people to a URL on our intranet and have them fill out a simple registration form and have this data written to a database. It would also be nice to have some data auto-populate (such as their name).
Is it overkill to set up a sharepoint server and try to do this with Access Webforms? Could I use something like dotnetnuke and find a module that works? Or how about options for writing custom forms?
View 3 Replies
Nov 18, 2010
I have five textboxes(tb1, tb2, ... tb5) on the page, each textbox represent a column in the database table.
I need to search the database table based on the text in the textboxes. User can either enter text in all five textboxes or none.
What's the best way to do a search?
I am thinking for one textbox(tb1), depends on if tb1.text is empty or not, I need to do 2 searches
[Code]....
for two textboxes(tb1 & tb2), depends on if tb1.text and/or tb2.text are empty or not, there are 4 combinations, so I need to do 4 searches
[Code]....
for three textboxes, there are 8 combinations,
Does that mean for five textboxes, I need to do 2 to the power of 5, 32 combinations, 32 if statements?
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
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
Mar 14, 2011
I need to search my sql database using full text search.
My question is: How do I create the stored procedure and query?
The full text is already created and I ma using asp.net and c# in my application?
Do I need to include the name of the full text index in the stored procedure and query?
View 3 Replies