I have a 2008 SQL Server Express installed on one of my machines and I\'m attempting to establish a remote connection... when I use the MS SQL Server Management Studio I can
It could be your SQL instance is not cobfigured to accept incoming TCP connections, you can check this under Start-> SQL Server 2008 -> Conguration Tools -> SQL Server Configuration Manager. On the left side in that tool you'll see network configuration, expand it to see which protocols are enabled.
What if you use Integrated Security=SSPI?
If you are not wanting to use a windows login I believe the other answer about removing the Integrated Security parameter is correct.
Ok - I am guessing you have tried all of these http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
Have you tried sqlping on MACHINENAME\SQLEXPRESS
Can you ping MACHINENAME
Finally, I am pretty sure you only need 1 slash i.e. MACHINENAME\SQLEXPRESS
try this
string sqlcon=("Data Source="your pc name\\SQLEXPRESS";
UserID=sa;
Password=****;
Initial Catalog="+MyDatabase+";
IntegratedSecurity=True;");
Remove Integrated Security=True from your connection string and (optional) add Persist Security Info=True;
From MSDN:
Integrated Security - When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication.