I mean I have used the connection string below:
scon1.ConnectionString = "Server=(local);Database=Department;Integrated Security=True";
but the compiler couldn't achieve the SQL Server and this error appeared:
please guide me to solve this,Thank you.

Joe WilsonPosted Apr 14, 2015, 12:33 AM
Khargesh RajputPosted Apr 13, 2015, 11:39 PM
http://blog.sqlauthority.com/2012/09/07/sql-server-fun-post-connecting-same-sql-server-using-different-methods/
http://stackoverflow.com/questions/155733/is-there-a-difference-between-local-and-localhost
Akhil GargPosted Apr 13, 2015, 3:36 PM
https://technet.microsoft.com/en-us/library/bb896140%28v=sql.110%29.aspx
Sql Compact is very light and mostly used for mobile app.
Sql Server is better for back -end.
Joe WilsonPosted Apr 13, 2015, 3:23 PM
Khargesh RajputPosted Apr 13, 2015, 1:22 AM
scon1.ConnectionString = "Server=(local);Database=Department;Integrated Security=True";
change
as
scon1.ConnectionString = "Server=127.0.0.1;Database=Department;Integrated
Security=True";
Khargesh RajputPosted Apr 13, 2015, 1:21 AM
https://msdn.microsoft.com/en-us/library/bb909712%28v=vs.90%29.aspx
Jignesh TrivediPosted Apr 13, 2015, 1:11 AM
Hope you are enable named piped by following steps.
In start menu, go to sql server xxxx/ Configuration tools/ Surface area configuration
Select Surface area configurations and connections
Remote Connections
On the right see named pipes is selected or not. You can go for either named pipes only or named pipes and TCP/IP.
restart SQL server service
Hope this will help.
Joe WilsonPosted Apr 13, 2015, 1:03 AM
How can I solve it?
Joe WilsonPosted Apr 13, 2015, 12:53 AM
Riddhi ValechaPosted Apr 13, 2015, 12:23 AM
SQL Server Database and SQL Server Compact 4.0 Local Database ??
Please explain in which situations, which one to use...
Also.... for back-end purpose... Oracle is better or SQL Server ??
Jignesh TrivediPosted Apr 13, 2015, 12:17 AM
This error due to the named pipe support is not enabled for your SQL server.To enable named pipes or for workarounds see the link
http://msdn.microsoft.com/en-us/library/ms175496(v=sql.110).aspx
hope this will help
Khargesh RajputPosted Apr 13, 2015, 12:09 AM
error caused by protocol setting
you can set
In start menu, go to sql server Configuration tools/ Surface area configuration
Select Surface area configurations and connections
Remote Connections
On the right see named pipes is selected or not. You can go for either named pipes only or named pipes and TCP/IP.