Specifies the number of stored procedures for which the ADO.NET driver caches information.
When to specify SPCache If you want to change the default value for SPCache, you must specify a new value before connecting to the database. The value cannot be changed at runtime.
ADO.NET
SPCache = value
Parameter |
Description |
---|---|
value |
A number that specifies how many stored procedures are added to a cache that contains information about each stored procedure’s parameters. To turn off caching, specify 0. |
SPCache=50
By default, the ADO.NET driver retrieves information from the server about a stored procedure’s parameters the first time the stored procedure is called and caches that information. The next time the procedure is called, the driver retrieves the information from the cache to improve performance. The information is retrieved based on the stored procedure’s name. The name is case sensitive.
If you call two different stored procedures with the same name, you can turn off caching by setting the value of SPCache to 0.
To turn off caching of stored procedure parameter information:
Database profile Specify 0 in the Maximum Procedures to Cache box on the System tab page in the Database Profile Setup dialog box.
Application Type the following in code:
SQLCA.DBParm="SPCache=0"