Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Linkbutton, Target="_blank" Pin
JohnQuar129-Sep-09 10:59
JohnQuar129-Sep-09 10:59 
GeneralRe: Linkbutton, Target="_blank" Pin
JohnQuar130-Sep-09 7:34
JohnQuar130-Sep-09 7:34 
GeneralRe: Linkbutton, Target="_blank" Pin
Member 364489322-Nov-11 3:13
Member 364489322-Nov-11 3:13 
GeneralRe: Linkbutton, Target="_blank" Pin
Not Active29-Sep-09 14:16
mentorNot Active29-Sep-09 14:16 
GeneralRe: Linkbutton, Target="_blank" Pin
harold aptroot30-Sep-09 1:30
harold aptroot30-Sep-09 1:30 
GeneralRe: Linkbutton, Target="_blank" Pin
harold aptroot30-Sep-09 1:42
harold aptroot30-Sep-09 1:42 
GeneralRe: Linkbutton, Target="_blank" Pin
JohnQuar130-Sep-09 7:36
JohnQuar130-Sep-09 7:36 
QuestionData connection from C# web service Pin
jbanko365129-Sep-09 6:56
jbanko365129-Sep-09 6:56 
Mad | :mad: Mad | :mad: Mad | :mad:
I am writing an XML web service in VS2008 using C#. SQL and VS are running on the same box. There are several SQL instances running because we are using the box to support our customers who are mixed 2005/2008 SQL server. From inside VS I can create a data connection to one of our SQL instances. The box is ESSERV and the instance is ES2008 so the connection string that is in the connection object is:

"Data Source=ESSERV\ES2008;Initial Catalog=ESData08;Integrated Security=True"

This works fine. I can see the ESData08 database, tables, SPs, etc. No problems. So in C# I use the following code:

String sqlConn = "Data Source=ESSERV/ES2008;Initial Catalog=ESData08;Integrated Security=True";
SqlConnection esConn = new SqlConnection(sqlConn);
esConn.Open();

YES, I flipped the backslash between ESSERV and ES2008 to a forward slash. MSDN said that was OK to do so it doesn't look like an escape sequence. And here is part of what I get:

System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection........... and about 2 dozen more lines of error.

So my question is WHY? I have tried every combination of ESSERV\ES2008 and all of them give me the same error. Named Pipes are enabled. So what is causing this error and is there a way to specify the data connection I have already defined and know works. I'm kind of new to VS and C# but I'm sure that the code is correct as it compiles and runs up to the open. Any help with this nightmare would be appreciated.

Thanks,

Joe B
AnswerRe: Data connection from C# web service Pin
Henry Minute29-Sep-09 10:15
Henry Minute29-Sep-09 10:15 
GeneralRe: Data connection from C# web service Pin
jbanko365129-Sep-09 11:56
jbanko365129-Sep-09 11:56 
Questiondelete Pin
nhqlbaislwfiikqraqnm29-Sep-09 5:48
nhqlbaislwfiikqraqnm29-Sep-09 5:48 
AnswerRe: Check Firefox Masterpassword Pin
Dave Kreskowiak29-Sep-09 6:30
mveDave Kreskowiak29-Sep-09 6:30 
GeneralMessage Closed Pin
29-Sep-09 6:38
nhqlbaislwfiikqraqnm29-Sep-09 6:38 
GeneralRe: Check Firefox Masterpassword Pin
Christian Graus29-Sep-09 10:33
protectorChristian Graus29-Sep-09 10:33 
AnswerRe: Check Firefox Masterpassword Pin
benjymous29-Sep-09 21:57
benjymous29-Sep-09 21:57 
QuestionAdd/Remove program through code Pin
Ajithevn29-Sep-09 3:35
Ajithevn29-Sep-09 3:35 
AnswerRe: Add/Remove program through code Pin
freakyit29-Sep-09 3:45
freakyit29-Sep-09 3:45 
GeneralRe: Add/Remove program through code Pin
Ajithevn29-Sep-09 3:56
Ajithevn29-Sep-09 3:56 
GeneralRe: Add/Remove program through code Pin
freakyit29-Sep-09 4:08
freakyit29-Sep-09 4:08 
Questionhelp meeeeeeeeeeee?programming cms Pin
torabi2329-Sep-09 3:23
torabi2329-Sep-09 3:23 
AnswerRe: help meeeeeeeeeeee?programming cms Pin
Luc Pattyn29-Sep-09 3:26
sitebuilderLuc Pattyn29-Sep-09 3:26 
AnswerRe: help meeeeeeeeeeee?programming cms Pin
stancrm29-Sep-09 3:33
stancrm29-Sep-09 3:33 
GeneralRe: help meeeeeeeeeeee?programming cms Pin
vivasaayi29-Sep-09 4:00
vivasaayi29-Sep-09 4:00 
AnswerRe: help meeeeeeeeeeee?programming cms Pin
Wes Aday29-Sep-09 8:52
professionalWes Aday29-Sep-09 8:52 
AnswerRe: help meeeeeeeeeeee?programming cms Pin
Christian Graus29-Sep-09 10:35
protectorChristian Graus29-Sep-09 10:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.