• vk-kirov (1/18/2010)


    Jedak (1/14/2010)


    if you used the .NET SQLClient as the driver the parameters would probably need to use the @ sign as that is how that provider works?

    MSDN says that question marks should be used to process parameters in OLE DB (http://msdn.microsoft.com/en-us/library/ms722661(VS.85).aspx):

    I know. I've written a ton of DTS packages and you use ? with the parameters on OLE DB.

    vk-kirov (1/18/2010)


    Jedak (1/14/2010)


    Using Parameters (OLE DB) [/b]


    SQL providers represent parameter markers within a command as question marks (?).

    Can you please provide an example of using the @ sign in .NET SQLClient?

    In SSIS if you use the ADO.NET provider or in straight ADO.NET in C#/VB.Net using the SQLCommand object you need to use @ and variable name not ?. Which is because of the difference in the provider used. So, I was asking a general question if the ? was more a function of the provider used then the use of EXEC. I'm not criticizing the question, just wondering out loud. 🙂

    If you're looking for a code example, it will be a while as I'll have to find some time. I probably should not even be writing this post. 🙂

    However, here is a link to some provider parameter information for .NET. Now whether this would translate to needing to use @Param in EXEC I don't know.

    http://msdn.microsoft.com/en-us/library/yy6y35y8.aspx