Creating separate class for database connection MFC vc++
-
I have created a simple dialog application where it can perform crud operations but how I did it was I open a connection an do some operations inside most of the buttons as I'm still starting out as a beginner(noob). What will be a good approach to separate all the database related operations in another class? or keeping as it is, is it a good practice? I would like some suggestions. Thank you.
-
I have created a simple dialog application where it can perform crud operations but how I did it was I open a connection an do some operations inside most of the buttons as I'm still starting out as a beginner(noob). What will be a good approach to separate all the database related operations in another class? or keeping as it is, is it a good practice? I would like some suggestions. Thank you.
Since you're asking the question, you probably already know the answer.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.' ― Confucian Analects
-
I have created a simple dialog application where it can perform crud operations but how I did it was I open a connection an do some operations inside most of the buttons as I'm still starting out as a beginner(noob). What will be a good approach to separate all the database related operations in another class? or keeping as it is, is it a good practice? I would like some suggestions. Thank you.
I did something similar here. It may not be exactly what you are after, but it does give you another perspective, which could ultimately get you to your goal.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles