Visual Basic app to read the text of a SQL Server 2000 stored procedure
I have a Visual Basic application that uses ADO to call a stored procedure to send orders for a client.
The orders are sent in batches. (A "batch" is one transmission to the vendor.)
There are usually about 10 orders per batch. The number of orders per batch are controlled in the stored procedure by the use of the "TOP XX" parameter in the SELECT statement. For example:
SELECT TOP 10 OrderID, OrderName, ..."
PROBLEM: I want my front end Visual Basic application to extract the number (it is "10" in my example) from the stored procedure and display it to the users.
They need this capability to give them a visual clue to change the stored procedure if they need to change the number of orders per batch.
(I realize that we can send this value to the stored procedure as a parameter and we may do that later.)
QUESTION: Is it possible to extract hard-coded information from the raw text of a stored procedure?