• Koen Verbeeck (2/21/2012)


    The problem is that you have to execute the stored procedure first to know the data types. And what if the stored procedure has conditional logic, and the resultset can change?...

    I cannot see the problem with it. Even if stored proc has conditional logic and it may return totally different resultsets, using the method I gave, will be possible to identify the datatypes of the columns in the resultset. For example, these sort of details might be used in creating of dynamic sql...

    So, that was the answer to OP question of how to do so.

    However, I cannot understand the reason why he would want to do what he asked for!

    And that is my question: Why he needs to do this?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]