nielsvdc
Apr 27th, 2001, 02:54 AM
Dear all,
I want to create one dll for different programs in my company. Per program
I want to create one class in the dll, but also some common classes, which
contain functions that are used in more then one program. All functions
are database related. How can I create a way to use one database
connection through one of the common (main) classes, but use that
connection in all of the functions in the other classes?
Theoretic example:
cls1 -> open connection1
cls2 -> function1 using cls1/connection1 to query db
cls3 -> function2 using cls1/connection1 to query db
I've tried several thing, but they all ended up with opening another
connection through cls1.
Can you maybe give some example code when you give an answer?
Thanks,
Niels van de Coevering
I want to create one dll for different programs in my company. Per program
I want to create one class in the dll, but also some common classes, which
contain functions that are used in more then one program. All functions
are database related. How can I create a way to use one database
connection through one of the common (main) classes, but use that
connection in all of the functions in the other classes?
Theoretic example:
cls1 -> open connection1
cls2 -> function1 using cls1/connection1 to query db
cls3 -> function2 using cls1/connection1 to query db
I've tried several thing, but they all ended up with opening another
connection through cls1.
Can you maybe give some example code when you give an answer?
Thanks,
Niels van de Coevering