The parameter cannot be a null value when SQL Server calls a stored procedure using an ODBC-driven linked server _mssql

Source: Internet
Author: User
Tags odbc ole

We know that SQL Server has a very strong selection of drivers for a linked server (linked server), a linked server (linked server) that was recently established with the Microsoft OLE DB driver for ODBC, and when the stored procedure procedure was invoked, Parameter cannot be a null value.


Otherwise, the following error message will be reported:

The corresponding English error prompts are:

EXEC xxx.xxx.dbo.Usp_Test null,null, ' all '

MSG 7213, level, State 1, line 1

The attempt by the provider to pass remote stored procedure parameters to remote server ' xxx ' failed. Verify that number of parameters, the order, and the values passed are correct.

The corresponding Chinese error prompts are:

EXEC xxx.xxx.dbo.Usp_Test null,null, ' all '

MSG 7213, level, State 1, line 1

The provider failed to pass the remote stored procedure parameter to the remote server ' xxx '. Make sure the number, order, and value of the parameters are correct.

EXEC xxx.xxx.dbo.Usp_Test ', ', ' all ' or giving the parameter an appropriate value does not report any errors. Alternatively, the parameter can be NULL when calling a stored procedure using the Microsoft OLE DB Provider for SQL server-driven linked server (linked server).

The above is a small compilation for everyone to share SQL Server using ODBC-driven linked server to call the stored procedure when the parameter can not be null value of all the content, I hope you like.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.