Hi guys,
I have a really strange problem with my ASP.NET application. I created it for
Mono and .NET and developed it in Visual Studio.
But as I recently started a Mono test run I recognized that my XSP server
crashes somehow. This does not happen periodicly. Most of the time I can log in
and
On Aug 17, 2012, at 5:49 PM, Philippe Grohrock philippe.grohr...@gmail.com
wrote:
1. Is it bad/good style to have a public class that implements global
variables?
How do you define global variable? :-)
`public static` fields are Very Bad™, unless they're `readonly`. This is
because there's
Thanks for the reply already and I'm sorry, I should've added the lines of
code.
This way the whole program has access to it and can modify/query the DB when
needed (this is what I meant with global). At the moment I have 2 of my
windows using that connection, but there might be more in the
I'd create ConnectionFactory class, although feel free to ignore me,
just thinking off the top of my head! :-)
public class ConnectionFactory
{
private static MySqlConnection _connection;
public MySqlConnection GetConnection()
{
if (_connection == null)
{
Just in case no-one else spots it, you'll need a static keyword on
that GetConnection() declaration, otherwise you have to create an
instance to get a reference to the private static variable, which is
just odd :)
On 20/08/12 20:45, James Wright wrote:
I'd create ConnectionFactory
Be carefull about this way of working with DB. You must free the connections as
fast as you can and I'm not sure you can do like this way.
What happen if you dispose the connection ? That would be the usual way of
freeing the queue (or thru the 'using' blocks).
/Gabriel
-Original
Be carefull about this way of working with DB. You must free the
connections as fast as you can and I'm not sure you can do like this way.
Basically the connection gets initialised when the application starts and
every time I need a query, the connection gets opened, queried, closed, but
not
Unless I'm mistaken .NET connections are pooled for you, so I don't
think you'll be gaining much from keeping one instance of the connection
always open as the framework is already doing just that. My advice is
don't worry about it until you have to... chances are it won't be a
problem in
Unless I'm mistaken .NET connections are pooled for you, so I don't think
you'll be gaining much from keeping one instance of the connection always
open as the framework is already doing just that. My advice is don't worry
about it until you have to... chances are it won't be a problem in
On mono-tools.com, they have download links for 1ClickInstall (openSuse), or
the monotools source tarball.
I'm trying to install on centos 6, specifically so I can remote debug something.
I haven't had any luck building from source, or trying to install the 1click.
Anybody have any
10 matches
Mail list logo