Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Amjath
Yak Posting Veteran
66 Posts |
Posted - 2007-01-03 : 01:53:59
|
Hi All,I'm new using sql server 2005 express as the database.Both the development and the database are in same machine as of now.i use connection string asSqlConnection test = new SqlConnection("server=AMJATHKHAN\\SQLEXPRESS;uid='';pwd='';database=TestDB;Trusted_Connection=yes;");its working fine in my pc.when i try to run the same executable in some other pc in the same lan it wont work..the sql server express is accessible to all machine in the LAN.then wat is the way to connect the remote sql server.Is IIS Required for this Stuff.plz help me.With RegardsAmjath |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-03 : 02:49:18
|
Have you enabled Remote connections on SQL Express?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
Amjath
Yak Posting Veteran
66 Posts |
Posted - 2007-01-03 : 02:54:25
|
Hi harsh,when i try to connect the db using sql server management studio express(other pc in the same network).it will connect the database.from this i taught that the remote connection get enabled in sql server express.am i right or else i want to enable remote connection in sql server expresswith Thanks and RegardsAmjath |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-03 : 02:58:08
|
While connecting from SSMS, are you using Windows Authentication or SQL Server Authentication mode?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
Amjath
Yak Posting Veteran
66 Posts |
Posted - 2007-01-03 : 02:58:41
|
Windows authenticated mode only |
|
|
mikewa
Microsoft SQL Server Product Team
84 Posts |
Posted - 2007-01-04 : 12:46:03
|
Your connection string includes both the uid & pwd hints as well as the trusted connection = true hint, these are incompatible. If you are using Windows Authentication you should not be providing uid and pwd. I would expect this to result in the behavior you are seeing though. It is more likely you have not correctly configured SQL Express to accept remote connections. Check out http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 to verify that you've correctly configured both SQL Express and the Firewall on your computer.Regards,Mike WachalSQL ExpressThis posting is provided "AS IS" with no warranties, and confers no rights.Use of included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm |
|
|
|
|
|