G
Guest
I am writing a class which connects to a database, then runs a stored
procedure and returns the results in a dataset.
Now I am quiet new to C#, and I was wondering is it better to create my
database connection within a constructor (of which I have 3) or create the
connection out side the constructors in a separate function which I call in
each constructor.
procedure and returns the results in a dataset.
Now I am quiet new to C#, and I was wondering is it better to create my
database connection within a constructor (of which I have 3) or create the
connection out side the constructors in a separate function which I call in
each constructor.