PRB: Access Violation Occurs When You Execute a Parameterized Query with SQLOLEDB (829402)
The information in this article applies to:
- Microsoft OLE DB Provider for SQL Server
SYMPTOMSWhen you use the Microsoft OLE DB Provider for SQL Server, and
you call the ICommand::Prepare method on a parameterized SQL statement that contains a
subquery or function, but you do not call the ICommandWithParameters::SetParameterInfo method for the
parameters before you do this, an access violation may occur.CAUSEIn Microsoft OLE DB Provider for SQL
Server, you must call the ICommandWithParameters::SetParameterInfo method to
describe parameter information when any SQL statement contains a subquery or function. You must do this even if the parameters are outside the subquery or function.RESOLUTIONIf
you execute a SQL command that contains a subquery or function with the Microsoft
OLE DB Provider for SQL Server, always describe the parameters by using
the ICommandWithParameters::SetParameterInfo method before you call the ICommand::Prepare method. STATUS This
behavior is by design.
| Modification Type: | Major | Last Reviewed: | 12/11/2003 |
|---|
| Keywords: | kbprb KB829402 kbAudDeveloper |
|---|
|