Declare as Public at different modules

  • Thread starter Thread starter Jul
  • Start date Start date
J

Jul

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.
 
Jul said:
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 said:
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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top