PC Review


Reply
Thread Tools Rate Thread

Declare as Public at different modules

 
 
Jul
Guest
Posts: n/a
 
      19th Oct 2004
Hi,

Maybe configuration for getting the same result can be simpler but I will
describe my real one.

I have one solitions which contains 2 projects: Class Lib and WinApp.
Class Lib define
Public conOut as OracleConnection (variable defined inside public Module)

WinApp also define Public conIn as OracleConnection

For both of this variable created created instance, assign conString and
Open , like
conIn = new OracleConnection
conIn.ConnectionString = "...."
conIn.Open()

Both instance correctly connected to DB

I also define my own Public Class in WinApp.
When I go inside method of that class conIn variable contains value but
conOut Is Nothing.

Why ??? As I told all variable, classes, ... defined as Public

Thanks for any idea.


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      19th Oct 2004
"Jul" <(E-Mail Removed)> schrieb:
> I have one solitions which contains 2 projects: Class Lib and WinApp.
> Class Lib define
> Public conOut as OracleConnection (variable defined inside public Module)
>
> WinApp also define Public conIn as OracleConnection
>
> For both of this variable created created instance, assign conString and
> Open , like
> conIn = new OracleConnection
> conIn.ConnectionString = "...."
> conIn.Open()
>
> Both instance correctly connected to DB
>
> I also define my own Public Class in WinApp.
> When I go inside method of that class conIn variable contains value but
> conOut Is Nothing.
>
> Why ??? As I told all variable, classes, ... defined as Public


I don't see any code assigning an instance of 'OracleConnection' to
'conOut'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

 
Reply With Quote
 
Jul
Guest
Posts: n/a
 
      19th Oct 2004

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Jul" <(E-Mail Removed)> schrieb:
> > I have one solitions which contains 2 projects: Class Lib and WinApp.
> > Class Lib define
> > Public conOut as OracleConnection (variable defined inside public

Module)
> >
> > WinApp also define Public conIn as OracleConnection
> >
> > For both of this variable created created instance, assign conString and
> > Open , like
> > conIn = new OracleConnection
> > conIn.ConnectionString = "...."
> > conIn.Open()
> >
> > Both instance correctly connected to DB
> >
> > I also define my own Public Class in WinApp.
> > When I go inside method of that class conIn variable contains value but
> > conOut Is Nothing.
> >
> > Why ??? As I told all variable, classes, ... defined as Public

>
> I don't see any code assigning an instance of 'OracleConnection' to
> 'conOut'.
>

for conOut the same , like for conIn
conOut = new OracleConnection
conOut.ConnectionString = "...."
conOut.Open()


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Public Variables, Class Modules and Standard Modules Excel Monkey Microsoft Excel Programming 2 30th Apr 2009 03:18 PM
Declare Worksheet name over multiple modules =?Utf-8?B?Tm9lbWk=?= Microsoft Excel Programming 3 11th Aug 2006 06:47 AM
Public, Private, Event modules, Forms modules,,, Jim May Microsoft Excel Programming 11 31st Oct 2005 03:12 AM
How to declare a Global Varable ? (So different modules in the same Workbook can see it?) tmb Microsoft Excel Discussion 2 10th Apr 2005 11:38 PM
I would like to declare a Public Function or Public Variable Henro Microsoft Access Getting Started 2 1st Dec 2003 04:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:33 PM.