Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Connecting to database Pin
kibromg9-Feb-09 6:33
kibromg9-Feb-09 6:33 
GeneralRe: Connecting to database Pin
Rob Philpott9-Feb-09 6:43
Rob Philpott9-Feb-09 6:43 
GeneralRe: Connecting to database Pin
kibromg9-Feb-09 6:57
kibromg9-Feb-09 6:57 
GeneralRe: Connecting to database Pin
Rob Philpott9-Feb-09 8:54
Rob Philpott9-Feb-09 8:54 
GeneralRe: Connecting to database Pin
kibromg9-Feb-09 23:41
kibromg9-Feb-09 23:41 
GeneralRe: Connecting to database Pin
Rob Philpott9-Feb-09 23:50
Rob Philpott9-Feb-09 23:50 
GeneralRe: Connecting to database Pin
kibromg10-Feb-09 0:05
kibromg10-Feb-09 0:05 
GeneralRe: Connecting to database Pin
Rob Philpott10-Feb-09 0:19
Rob Philpott10-Feb-09 0:19 
Yeah, you could add some functionality to that class which returns a valid open connection, and just use that as the connection

Something like:

public SqlConnection CreateConnection()
{
    SqlConnection connnection = new SqlConnection(ConnectionString);
    connection.Open();
    return connection;
}


Remember to use the connection in a using bloke or call its dispose when you are done with it.

Regards,
Rob Philpott.

GeneralRe: Connecting to database Pin
kibromg10-Feb-09 0:37
kibromg10-Feb-09 0:37 
GeneralRe: Connecting to database Pin
Rob Philpott10-Feb-09 0:57
Rob Philpott10-Feb-09 0:57 
GeneralRe: Connecting to database Pin
kibromg10-Feb-09 1:09
kibromg10-Feb-09 1:09 
QuestionExtract data in a binary file using c# Pin
mamamiya_9-Feb-09 5:18
mamamiya_9-Feb-09 5:18 
AnswerRe: Extract data in a binary file using c# Pin
led mike9-Feb-09 5:32
led mike9-Feb-09 5:32 
AnswerRe: Extract data in a binary file using c# Pin
#realJSOP9-Feb-09 5:56
professional#realJSOP9-Feb-09 5:56 
GeneralRe: Extract data in a binary file using c# Pin
mamamiya_9-Feb-09 6:21
mamamiya_9-Feb-09 6:21 
Question[Message Deleted] Pin
suni_dotnet9-Feb-09 5:07
suni_dotnet9-Feb-09 5:07 
QuestionRe: my senerio Pin
led mike9-Feb-09 5:11
led mike9-Feb-09 5:11 
AnswerRe: my senerio Pin
Dan Neely9-Feb-09 5:39
Dan Neely9-Feb-09 5:39 
QuestionFileSystemWatcher Pin
Jacob D Dixon9-Feb-09 5:03
Jacob D Dixon9-Feb-09 5:03 
AnswerRe: FileSystemWatcher Pin
led mike9-Feb-09 5:10
led mike9-Feb-09 5:10 
GeneralRe: FileSystemWatcher Pin
Jacob D Dixon9-Feb-09 5:18
Jacob D Dixon9-Feb-09 5:18 
GeneralRe: FileSystemWatcher Pin
led mike9-Feb-09 5:20
led mike9-Feb-09 5:20 
GeneralRe: FileSystemWatcher Pin
Jacob D Dixon9-Feb-09 5:22
Jacob D Dixon9-Feb-09 5:22 
GeneralRe: FileSystemWatcher Pin
led mike9-Feb-09 5:36
led mike9-Feb-09 5:36 
GeneralRe: FileSystemWatcher Pin
Jacob D Dixon9-Feb-09 5:49
Jacob D Dixon9-Feb-09 5:49 

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.