Click here to Skip to main content
15,889,858 members
Home / Discussions / Database
   

Database

 
GeneralRe: T-SQL: How to force rows insertion ignoring transactions? Pin
Yuval Naveh20-Jan-10 2:59
Yuval Naveh20-Jan-10 2:59 
QuestionCentralized Query Optimization Pin
AmbiguousName19-Jan-10 6:34
AmbiguousName19-Jan-10 6:34 
AnswerRe: Centralized Query Optimization Pin
Eddy Vluggen19-Jan-10 9:43
professionalEddy Vluggen19-Jan-10 9:43 
GeneralRe: Centralized Query Optimization Pin
AmbiguousName19-Jan-10 21:14
AmbiguousName19-Jan-10 21:14 
GeneralRe: Centralized Query Optimization Pin
Eddy Vluggen20-Jan-10 0:15
professionalEddy Vluggen20-Jan-10 0:15 
QuestionBULK INSERT problem with SQL Server 2008 DATE format Pin
Gawiz19-Jan-10 6:16
professionalGawiz19-Jan-10 6:16 
AnswerRe: BULK INSERT problem with SQL Server 2008 DATE format Pin
Eddy Vluggen19-Jan-10 11:04
professionalEddy Vluggen19-Jan-10 11:04 
QuestionOpening A Database Connection [SOLVED] Pin
#realJSOP19-Jan-10 4:24
mve#realJSOP19-Jan-10 4:24 
I've written a program using C# that is supposed to access a database. When I try to actually open the connection, I get this exception:

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)

The database access code is contained in a separate assembly. This same assembly is used in another program (written in VB if that matters) that connects to the same database without any problems at all (on the same machine, with the same user logged in, and using the same connection string).

Why am I getting this exception in one program and not in another?

EDIT ===================

Here are the constructors for both apps:

VB: Dim myClass as new MyClass("abc", "def\geh")
C# MyClass myClass = new MyClass("abc", "def\geh");

The problem is that VB automatically escapes the backlslash, but c# requires @"def\geh"...

Stupid programmer tricks...

.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

modified on Tuesday, January 19, 2010 2:32 PM

AnswerRe: Opening A Database Connection Pin
loyal ginger19-Jan-10 4:34
loyal ginger19-Jan-10 4:34 
GeneralRe: Opening A Database Connection [modified] Pin
#realJSOP19-Jan-10 4:57
mve#realJSOP19-Jan-10 4:57 
GeneralRe: Opening A Database Connection Pin
Eddy Vluggen19-Jan-10 5:08
professionalEddy Vluggen19-Jan-10 5:08 
GeneralRe: Opening A Database Connection Pin
#realJSOP19-Jan-10 5:26
mve#realJSOP19-Jan-10 5:26 
AnswerRe: Opening A Database Connection Pin
Luc Pattyn19-Jan-10 5:52
sitebuilderLuc Pattyn19-Jan-10 5:52 
GeneralRe: Opening A Database Connection Pin
#realJSOP19-Jan-10 6:18
mve#realJSOP19-Jan-10 6:18 
GeneralRe: Opening A Database Connection Pin
#realJSOP19-Jan-10 7:15
mve#realJSOP19-Jan-10 7:15 
GeneralRe: Opening A Database Connection Pin
#realJSOP19-Jan-10 8:37
mve#realJSOP19-Jan-10 8:37 
AnswerRe: Opening A Database Connection Pin
Shameel19-Jan-10 8:04
professionalShameel19-Jan-10 8:04 
GeneralRe: Opening A Database Connection [modified] Pin
#realJSOP19-Jan-10 8:25
mve#realJSOP19-Jan-10 8:25 
QuestionConsuming a web service using a stored procedure Pin
Mohammad Al Hoss19-Jan-10 3:10
Mohammad Al Hoss19-Jan-10 3:10 
AnswerRe: Consuming a web service using a stored procedure Pin
Eddy Vluggen19-Jan-10 5:06
professionalEddy Vluggen19-Jan-10 5:06 
QuestionFloating Point Numbers Stored as Text with Integration Services Pin
moon_stick19-Jan-10 2:22
moon_stick19-Jan-10 2:22 
AnswerRe: Floating Point Numbers Stored as Text with Integration Services Pin
Eddy Vluggen19-Jan-10 11:15
professionalEddy Vluggen19-Jan-10 11:15 
QuestionSQL Application - stuck on the way I should update my Table Pin
ps0f0r18-Jan-10 22:24
ps0f0r18-Jan-10 22:24 
AnswerRe: SQL Application - stuck on the way I should update my Table Pin
Mycroft Holmes19-Jan-10 10:39
professionalMycroft Holmes19-Jan-10 10:39 
QuestionQuestion about simple pattern recognition (hopefully the solution is simple too...) Pin
James Shao17-Jan-10 22:24
James Shao17-Jan-10 22:24 

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.