SAP Knowledge Base Article - Public

1185034 - Error: "Invalid Argument Provided" occurs when setting database location to a stored procedure using an OLEDB provider in Crystal Reports


  • Error: "Invalid Argument Provided"
  • When setting the database location of a stored procedure in Crystal Reports, and selecting a MS SQL Server OLEDB Provider, it fails with the error:
    "Invalid Argument Provided"


  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. In Crystal Reports designer, open a report based off a MS SQL Server Stored Procedure.
  2. Under the menu "Database", select "Set Datasource Location...."
  3. In the "Set Datasource Location" window, set the stored procedure to point to another stored procedure of the same structure using a MS SQL Server OLEDB Provider.
    It fails with the error: "Invalid Argument Provided"


  • Below are two potential cause for this error:
    • The default connection timeout of the OLEDB provider could be too small to be able to execute the Stored Procedure to fetch it's structures, and causes the report to through the error; or
    • The version of the MS SQL Server OLEDB Provider selected is incorrect.


  • If the Stored Procedure takes a long time to execute, ensure the connection timeout property of the OLEDB Provider option is set to zero. ( Connection Timeout = 0 )
  • If the Stored Procedure execution is short, ensure you select the correct OLEDB Provider corresponding to the version of SQL Server you are using.


Invalid Argument Provided, OLEDB, parameter, huge range, SQL. , 189866 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem


Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016