Click here to Skip to main content
15,885,925 members
Home / Discussions / C#
   

C#

 
GeneralRe: Declaring a connection string in class file Pin
Pete O'Hanlon13-Aug-12 22:51
mvePete O'Hanlon13-Aug-12 22:51 
GeneralRe: Declaring a connection string in class file Pin
Member 925960614-Aug-12 0:00
Member 925960614-Aug-12 0:00 
GeneralRe: Declaring a connection string in class file Pin
Pete O'Hanlon14-Aug-12 0:04
mvePete O'Hanlon14-Aug-12 0:04 
AnswerRe: Declaring a connection string in class file Pin
Shameel13-Aug-12 4:23
professionalShameel13-Aug-12 4:23 
AnswerRe: Declaring a connection string in class file Pin
Pete O'Hanlon13-Aug-12 4:31
mvePete O'Hanlon13-Aug-12 4:31 
GeneralRe: Declaring a connection string in class file Pin
Shameel13-Aug-12 5:47
professionalShameel13-Aug-12 5:47 
GeneralRe: Declaring a connection string in class file Pin
Pete O'Hanlon14-Aug-12 0:04
mvePete O'Hanlon14-Aug-12 0:04 
GeneralRe: Declaring a connection string in class file Pin
Shameel14-Aug-12 1:49
professionalShameel14-Aug-12 1:49 
Pete O'Hanlon wrote:
I was right.

No you're still not. He had used
C#
SqlConnection con = new SqlConnection("Conn");

Removing the quotes around Conn would have worked since he had already declared Conn. The actual question has got to do with where he had declared the Conn variable and if his line of code had access to it (which is still not clear from the OP's post).
GeneralRe: Declaring a connection string in class file Pin
Pete O'Hanlon14-Aug-12 2:02
mvePete O'Hanlon14-Aug-12 2:02 
GeneralRe: Declaring a connection string in class file Pin
Member 925960614-Aug-12 2:20
Member 925960614-Aug-12 2:20 
GeneralRe: Declaring a connection string in class file Pin
Pete O'Hanlon14-Aug-12 2:40
mvePete O'Hanlon14-Aug-12 2:40 
GeneralRe: Declaring a connection string in class file Pin
Member 925960614-Aug-12 2:53
Member 925960614-Aug-12 2:53 
GeneralRe: Declaring a connection string in class file Pin
Shameel14-Aug-12 4:13
professionalShameel14-Aug-12 4:13 
GeneralRe: Declaring a connection string in class file Pin
Pete O'Hanlon14-Aug-12 4:34
mvePete O'Hanlon14-Aug-12 4:34 
AnswerRe: Declaring a connection string in class file Pin
Simon_Whale13-Aug-12 4:35
Simon_Whale13-Aug-12 4:35 
AnswerRe: Declaring a connection string in class file Pin
Vijay Selvaraj26-Aug-12 22:10
Vijay Selvaraj26-Aug-12 22:10 
Questionin C#.net [moved] Pin
Member 925960613-Aug-12 2:56
Member 925960613-Aug-12 2:56 
GeneralRe: in C#.net Pin
chriselst13-Aug-12 3:01
chriselst13-Aug-12 3:01 
GeneralRe: in C#.net Pin
V.13-Aug-12 3:04
professionalV.13-Aug-12 3:04 
GeneralRe: in C#.net Pin
JimmyRopes13-Aug-12 3:10
professionalJimmyRopes13-Aug-12 3:10 
GeneralRe: in C#.net Pin
V.13-Aug-12 3:14
professionalV.13-Aug-12 3:14 
GeneralRe: in C#.net Pin
NormDroid13-Aug-12 3:09
professionalNormDroid13-Aug-12 3:09 
JokeRe: in C#.net Pin
Joan M13-Aug-12 3:13
professionalJoan M13-Aug-12 3:13 
GeneralRe: in C#.net Pin
fjdiewornncalwe13-Aug-12 3:14
professionalfjdiewornncalwe13-Aug-12 3:14 
GeneralRe: in C#.net Pin
Pete O'Hanlon13-Aug-12 3:14
mvePete O'Hanlon13-Aug-12 3:14 

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.