Reputation: 1
My FTS works in MSSQL fine , but when I try it from my website in ASP.NET it gives me this error: Full-Text Search is not installed, or a full-text Component cannot be loaded
.
My connection to SQL is good, and I can load another things from it.
My code:
string B = TextBox1.text;
string commandText = "SELECT Table_id FROM TableName WHERE CONTAINS ( Table_txt , @0)";
SqlCommand Cmd = new SqlCommand(commandText_, Con);
Cmd.Parameters.AddWithValue("@0", B);
Datatable dt = new Datatable();
Con.Open();
dt.Load(Cmd.ExecuteReader());
Con.Close();
Upvotes: 0
Views: 142
Reputation: 1111
Step 1.
Run query (SSMS)
SELECT FULLTEXTCATALOGPROPERTY('MyCatalogName', 'PopulateStatus')
This should return 0 if dictionary building process is completed.
Then run
SELECT FULLTEXTCATALOGPROPERTY('MyCatalogName', 'UniqueKeyCount')
This should return the unique number of words built in your catalog.
Then run
SELECT * FROM MyTable WHERE CONTAINS(*, 'SearchItem')
This should return values in SSMS.
Step 2
If all steps are successful in Step 1, Ensure you are passing the right table name in place of 'Table_txt' in your query. Pass * for all columns or within brackets (), pass all search columns separated by coma.
If you are still not getting output give more details.
Upvotes: 1