Strange problem with Building reports in visual studio

  • It's getting me nuts. I am rewriting CLR's into Stored Procedures that are used as datasources in SSRS 2005 reports. For example i have a dataset called basedata that is a stored procedure. This stored procedure is called with some parameters and creates a query.

    The crazy thing is when i test the stored procedure directy from within Management studio everything works fine. Inside the stored procedure i use begin try end try statements to get errors and write them to database.

    When there are no errors recorded during the proces the query can execute. Even when there is a error in the execution this error is logged to.

    Basically what i want is that when the stored procedure runs ok i want the dataset returned. When something go wrong i want all of my errors returned during the proces. This works just fine within Management studio.

    When the same procedure is called from within Visual studio i have a recordset returned just like the one in Management studio. But building the fields doens't work and also there is a error. The stupid thing is that the error is not recorded in the error table.

    :hehe:

  • Hi,

    Can u please give me some more info on the sp output,like what exactly it will give in Management Studio ...

    Thanks

    veeren 🙂

    Thanks & Regards,
    Veeren.
    Ignore this if you feel i am Wrong. 😉

  • I found the problem allready. The problem is that a parameter inside visual studio = ''

    i am checking in my stored procedure for this value.

    The thing is that it's a nvarchar and visual studio turns the '' into ''''''. The query that i build and want to execute with exec (@SQLMain) within the begin try construction gives an error.

    :hehe:

  • Ok all right ...

    Thanks & Regards,
    Veeren.
    Ignore this if you feel i am Wrong. 😉

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply