Works in Query Analyzer but not in ASP!

  • Apologies for my ignorance but i'm calling a stored proc from a web page and getting an OLE DB error message. The proc runs fine in Query Analyzer. The offending code is calling a function which returns a table. The function itself is stored in the User Defined Functions for the database.

    CREATE procedure dataTable

    @Years varchar(200)='1,2,3,4,5,6,7,8,9'

    AS

    SELECT [yearName] INTO #YearTemp FROM [zYears] y

    JOIN iter_intlist_to_table(@Years) i ON y.yearID = i.number

    GO

    Any ideas?

  • Your iter_intlist_to_table function should be preceded by "dbo.".

  • like this?

    SELECT [yearName] INTO #YearTemp FROM [zYears] y

    JOIN dbo.iter_intlist_to_table(@Years) i ON y.yearID = i.number

    Thanks for the suggestion but it's still not working...

  • Sorry I was being stupid - there was another problem, passing the wrong data type into the sproc (and then into the function).

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

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