Hi everyone,
I was sondering if someone can point me in the right direction to the following :
We currently have a web application in old asp that is used by our clients.
Each client has there own database for there data.
Now i am trying to rewrite the application so it is Object Orientated.
I have an object that loads its data from sql using a stored procedure, what happens when i have to load more then 1 object into a collection? I cant reuse the stored procedure, unless i start changing the input variables it accepts, which means i have to have another stored procedure that loads multiple items. Is this the correct way of doing it? I dont really want duplicate code in the database, as at the moment we have over 70 databases! So that is a lot of stored procedures.
What about creating the SQL dynamically? I know that i would still repeat the code, but it would only be in the base and collection class. Would this be the better approach?
If anyone has any material that they think i need to read i would be willing to read it, if you can send me a link.
Cheers
Darren
I was sondering if someone can point me in the right direction to the following :
We currently have a web application in old asp that is used by our clients.
Each client has there own database for there data.
Now i am trying to rewrite the application so it is Object Orientated.
I have an object that loads its data from sql using a stored procedure, what happens when i have to load more then 1 object into a collection? I cant reuse the stored procedure, unless i start changing the input variables it accepts, which means i have to have another stored procedure that loads multiple items. Is this the correct way of doing it? I dont really want duplicate code in the database, as at the moment we have over 70 databases! So that is a lot of stored procedures.
What about creating the SQL dynamically? I know that i would still repeat the code, but it would only be in the base and collection class. Would this be the better approach?
If anyone has any material that they think i need to read i would be willing to read it, if you can send me a link.
Cheers
Darren