Click here to Skip to main content
15,900,456 members
Home / Discussions / C#
   

C#

 
GeneralNTDll's Compression Functions Pin
Stanimir_Stoyanov26-Feb-05 11:52
Stanimir_Stoyanov26-Feb-05 11:52 
GeneralRe: NTDll's Compression Functions Pin
Heath Stewart27-Feb-05 4:25
protectorHeath Stewart27-Feb-05 4:25 
Generalarrange dataGrid Columns Pin
Adnan Siddiqi26-Feb-05 10:53
Adnan Siddiqi26-Feb-05 10:53 
GeneralRe: arrange dataGrid Columns Pin
Heath Stewart27-Feb-05 4:30
protectorHeath Stewart27-Feb-05 4:30 
GeneralSystem.Xml.XmlException: The root element is missing. Pin
mantissaPuc26-Feb-05 9:53
mantissaPuc26-Feb-05 9:53 
GeneralRe: System.Xml.XmlException: The root element is missing. Pin
Radgar26-Feb-05 16:59
Radgar26-Feb-05 16:59 
GeneralProblem with my DB.. Pin
Tugbay Sahin26-Feb-05 9:14
Tugbay Sahin26-Feb-05 9:14 
GeneralRe: Problem with my DB.. Pin
Colin Angus Mackay26-Feb-05 9:20
Colin Angus Mackay26-Feb-05 9:20 
Since we don't know what is on line 138 (which is where your error is) it is going to be difficult to help you pinpoint this.

The code you supply is the constructor for the class, in that constructor you declare a local variable called myConnection, which you initialise and then Open(). The constructor completes the myConnection goes out of scope (in other words it cannot be referenced any more)

Line 138, I can only guess, is outside the constructor and cannot access the local variables within the constructor. If you want to be able to access the variable myConnection from else where in the class you must declare it at the class level and not at the method level.

Does this help?


Cada uno es artifice de su ventura
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums


GeneralRe: Problem with my DB.. Pin
Tugbay Sahin26-Feb-05 9:27
Tugbay Sahin26-Feb-05 9:27 
GeneralRe: Problem with my DB.. Pin
Colin Angus Mackay26-Feb-05 9:41
Colin Angus Mackay26-Feb-05 9:41 
GeneralRe: Problem with my DB.. Pin
Tugbay Sahin26-Feb-05 9:43
Tugbay Sahin26-Feb-05 9:43 
GeneralRe: Problem with my DB.. Pin
Rob Graham26-Feb-05 9:41
Rob Graham26-Feb-05 9:41 
Generalescaping special characters... Pin
theJazzyBrain26-Feb-05 8:51
theJazzyBrain26-Feb-05 8:51 
GeneralRe: escaping special characters... Pin
leppie26-Feb-05 9:09
leppie26-Feb-05 9:09 
GeneralRe: escaping special characters... Pin
theJazzyBrain27-Feb-05 11:26
theJazzyBrain27-Feb-05 11:26 
GeneralRe: escaping special characters... Pin
Dave Kreskowiak26-Feb-05 9:37
mveDave Kreskowiak26-Feb-05 9:37 
GeneralRe: escaping special characters... Pin
theJazzyBrain27-Feb-05 1:37
theJazzyBrain27-Feb-05 1:37 
GeneralRe: escaping special characters... Pin
Dave Kreskowiak27-Feb-05 3:12
mveDave Kreskowiak27-Feb-05 3:12 
GeneralRe: escaping special characters... Pin
theJazzyBrain27-Feb-05 11:26
theJazzyBrain27-Feb-05 11:26 
GeneralLan Messenger in C# Pin
naq26-Feb-05 8:29
naq26-Feb-05 8:29 
GeneralRe: Lan Messenger in C# Pin
Dave Kreskowiak26-Feb-05 9:35
mveDave Kreskowiak26-Feb-05 9:35 
GeneralRe: Lan Messenger in C# Pin
qnzone27-Feb-05 8:20
qnzone27-Feb-05 8:20 
GeneralShared Ressource? between main and thread for keeping track of status Pin
Shaitan0026-Feb-05 8:20
Shaitan0026-Feb-05 8:20 
GeneralHTTP protocol violation problem Pin
Small Rat26-Feb-05 6:59
Small Rat26-Feb-05 6:59 
GeneralRe: HTTP protocol violation problem Pin
Radgar26-Feb-05 9:34
Radgar26-Feb-05 9:34 

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.