Stored Procedure
It is such a painful experience to learn Stored Procedure. It is not hard to create a Stored Procedure if one would know what he has in mind, but the problem is with the program that would utilizes the Stored Procedure.
Each Stored Procedure has its own set of input parameters and output parameters. If we are going to create a wrapper object around it, and if the object is not robust enough, it would be forever a process of adding new codes to handle specific Stored Procedure and would IMHO that the code will become unmanageable and chaotic.
I have an idea of instead calling the Stored Procedure right away, why not using the power of XML instead? The idea would be complex but it may helps to reduce changes made to the code and make it more robust and more portable.
i.e. we could have an XML file that stored the name of the Stored Procedure, the number of input parameters, and the number of output parameters. In return, the object wrapper could just return the result in an XML string too!!! So the host program that invoke the object can just simply parse the XML result. This way, the object wrapper can be designed to just deal with the XML input and XML output, eliminating the needs to create so many methods to deal with different scenario like 'N parameters in N-knot parameters out', 'N parameters in 0 parameter out', '0 parameter in N parameters out', '0 parameter in 0 parameter out', etc.
It might be silly though, but I think it's doable and could be useful. That's me!!! Imaginative but yet hard to achieve :D
Each Stored Procedure has its own set of input parameters and output parameters. If we are going to create a wrapper object around it, and if the object is not robust enough, it would be forever a process of adding new codes to handle specific Stored Procedure and would IMHO that the code will become unmanageable and chaotic.
I have an idea of instead calling the Stored Procedure right away, why not using the power of XML instead? The idea would be complex but it may helps to reduce changes made to the code and make it more robust and more portable.
i.e. we could have an XML file that stored the name of the Stored Procedure, the number of input parameters, and the number of output parameters. In return, the object wrapper could just return the result in an XML string too!!! So the host program that invoke the object can just simply parse the XML result. This way, the object wrapper can be designed to just deal with the XML input and XML output, eliminating the needs to create so many methods to deal with different scenario like 'N parameters in N-knot parameters out', 'N parameters in 0 parameter out', '0 parameter in N parameters out', '0 parameter in 0 parameter out', etc.
It might be silly though, but I think it's doable and could be useful. That's me!!! Imaginative but yet hard to achieve :D
Comments