Data sets not allowing any other parameter other than string

Posted by: rwade on 16 March 2018, 8:35 am EST

  • Posted 16 March 2018, 8:35 am EST

    We keep getting this error when we attempt to create a dataset with a stored procedure when we attempt to set the parameter to anything other than string.

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
    at System.Data.SqlClient.SqlDataReader.get_MetaData()
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
    at GrapeCity.BI.Data.DataProviders.SysCommandAdapter.ExecuteReader(CommandBehavior behavior)
    at GrapeCity.ActiveReports.ReportsCore.Tools.DataSourceHelper.ExecuteQuery(ConnectionProperties connectionProperties, Query query, String userName, String password, CommandBehavior commandBehavior, Int32 previewLimit, Boolean wrapException)
    at #RU0.#ze1.#aV0(DataSetQueryTask task)
  • Replied 16 March 2018, 8:36 am EST

    Cannot construct data type date, some of the arguments have values which are not valid.
  • Replied 16 March 2018, 8:41 am EST

    We are expecting integers to be past in, This works find when we execute it outside the product.

    ALTER PROC [WCReports].[EmployeeProBonoHoursProc]
    @month INTEGER = NULL,
    @year INTEGER = NULL

    SET @month = ISNULL(@month, MONTH(GETDATE()))
    SET @year = ISNULL(@year, YEAR(GETDATE()))
  • Marked as Answer

    Replied 18 March 2018, 5:24 pm EST


    I am not able to reproduce the issue at my end. Could you please share the following information:
    1. Exact ARS version that you are using.
    2. Which database are you using(SQLite, MSSQL)?
    3. Screenshot of the error message.


Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels