maximum number of parameters in sp_executesql

  • Is there a limit to the number of parameters that can be added to an sp_executesql statement?

    (2100 for procs & function)

    I can see from bol that the size of the string is limited only by available database server memory (we are not using 64bit technology). We have a persistance layer which is passing encreasing numbers of parameters to sql 2005 database.

    Many thanks in advance of your help.

    Ian

  • Sounds messy. Have you consdered bundling the parameters into a xml file and passing that?

    I think this would be cleaner and woud avoid any limit/size problems.

    www.sql-library.com[/url]

  • With SQL2008 and the latest version of ADO you can even pass a table.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply