Using DbCommandInterceptor to intercept a custom data provider command

Posted by: marcon on 31 January 2023, 6:28 am EST

    • Post Options:
    • Link

    Posted 31 January 2023, 6:28 am EST

    Hi Team,

    I’m trying to customize this sample https://github.com/activereports/Samples16/tree/main/Advanced/PageAndRDL/CustomDataProvider/C%23 to intercept the CsvCommand execution with a DbCommandInterceptor class.

    Do you know if it is possible?

    Thanks!

  • Posted 31 January 2023, 11:39 pm EST

    Hi Gustavo,

    Unfortunately, we don’t think you can use DbCommandInterceptor with CSV DataSource as DbCommandInterceptor can be used with SQL-based DataSources due to its requirement to specify the SQL Connection String in the UseSqlServer method.

    However, we have escalated this query to our development team Ticket ID [AR-30173] to see if there’s any way to achieve your requirement. We’ll get back to you as soon as we have a response back from them.

    Regards,

    Anand

  • Posted 1 February 2023, 9:53 pm EST

    Hi Gustavo,

    As per the developer’s response currently, we cannot use DbCommandInterceptor with CSV DataSource as it is a feature of Entity Framework whereas our custom provider uses the common DbDataReader.

    Apologies for the inconvenience caused.

    Regards,

    Anand

Need extra support?

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

Learn More

Forum Channels