Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All, I Have a C#.net Desktop Application, Which is fully complete,and work well when use with direct connection with Database,

Now my issue is When i attach this application with Mdf file of Same Database, then Some Feature of My project Not work(Like Full text Search,which i use for indexing at text type column)..

So please help..
Database Size is 2.5 GB
My Query Like This
SELECT....WHERE CONTAINS()


I Got Error Like This:
Cannot use full-text search in user instance



My Connection String is:
name="ITL" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ITL_Local.mdf;Integrated Security=True;User Instance=True
Posted
Updated 29-Sep-15 8:55am
v6
Comments
Wendelius 29-Sep-15 14:22pm    
Do you get some errors or what?
Arun kumar Gauttam 29-Sep-15 14:27pm    
Cannot use full-text search in user instance

See: Cannot use full-text search in user instance[^]

Simply don't use user instance. Attach the database normally.

Quote:
Full text Search is not supported on a SQL Server Express user instance.

https://technet.microsoft.com/en-us/library/ms143684(v=sql.105).aspx[^]
 
Share this answer
 
Comments
Arun kumar Gauttam 29-Sep-15 14:46pm    
Dear Sir, How i attach database normaly,
if i create Setup of application then it is necessary to add mdf file with Application setup.
Arun kumar Gauttam 29-Sep-15 14:47pm    
and i use this connection string:
add name="ITL" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ITL_Local.mdf;Integrated Security=True;User Instance=True;" providername="System.Data.SqlClient"
Suvendu Shekhar Giri 29-Sep-15 14:47pm    
Correct :)
Arun kumar Gauttam 29-Sep-15 14:50pm    
So this is my problem, that if i use MDF file with application,my full text search not work..
So now Whats the solution ???????

Can i remove
User Instance=True;
into my connection string
Zoltán Zörgő 29-Sep-15 16:11pm    
I don't know which kind of setup you made, but I am sure it supports not only installing SQL Server Express named or default instance, but also attaching database to it during setup. User instances run like simple out of process components. If your application runs with enough rights, you can attach also from your code with T-SQL or SMO.
As the error says, don't use a user instance. This is not supported. Instead, use a normal, service based instance and attach the database into that instance.

The problem with user instances is that they are started and stopped along with the program. Basically this eliminates the possibility to use any 'background services'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900