"Strange" things with public vars in modules...?
In VB6, in a Win32 app, you can do the following in a module:
VB Code:
Option Explicit
Public gadoConn As ADODB.Connection
Now, if 5 apps are running on the same PC, the connection object is private to each app. Fair enough. Two thumbs fresh.
Now, when we do this in an ASP.NET app then very strange thinsg happen.
Every user who uses the app, sees exactly the same connection object, it's not session based. This goes pear shaped as certain users have certain connection strings. BUT...sometimes the connection gets changed for user A while User B is still using it...How can I stop this?
Bearing in mind, I am well aware public connection are not good practice.
Woof
Re: "Strange" things with public vars in modules...?
Make it public for each user's class object.
Re: "Strange" things with public vars in modules...?
Re: "Strange" things with public vars in modules...?
Quote:
Bearing in mind, I am well aware public connection are not good practice.
I think you answered your question and you know what you have to do.